From 0952065172bce5b6078bdad11b205be232163697 Mon Sep 17 00:00:00 2001 From: Bhavik Patel Date: Wed, 4 Mar 2026 13:56:57 +0400 Subject: [PATCH] fix: add transpilePackages for ESM-only markdown deps (#147) Add react-markdown and remark-gfm to transpilePackages in next.config.js so Next.js transpiles these ESM-only modules correctly in all environments. This fixes 'Module not found: Can't resolve remark-gfm' build errors. Fixes #142 --- next.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/next.config.js b/next.config.js index e24a943..3ee2c78 100644 --- a/next.config.js +++ b/next.config.js @@ -2,6 +2,8 @@ const nextConfig = { output: 'standalone', turbopack: {}, + // Transpile ESM-only packages so they resolve correctly in all environments + transpilePackages: ['react-markdown', 'remark-gfm'], // Security headers async headers() {