bhavikprit commited on
Commit
cd0dfc3
·
unverified ·
1 Parent(s): 6b2e74b

fix: add transpilePackages for ESM-only markdown deps (#147)

Browse files

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

Files changed (1) hide show
  1. next.config.js +2 -0
next.config.js CHANGED
@@ -2,6 +2,8 @@
2
  const nextConfig = {
3
  output: 'standalone',
4
  turbopack: {},
 
 
5
 
6
  // Security headers
7
  async headers() {
 
2
  const nextConfig = {
3
  output: 'standalone',
4
  turbopack: {},
5
+ // Transpile ESM-only packages so they resolve correctly in all environments
6
+ transpilePackages: ['react-markdown', 'remark-gfm'],
7
 
8
  // Security headers
9
  async headers() {