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
This commit is contained in:
parent
3681420376
commit
0952065172
|
|
@ -2,6 +2,8 @@
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
turbopack: {},
|
turbopack: {},
|
||||||
|
// Transpile ESM-only packages so they resolve correctly in all environments
|
||||||
|
transpilePackages: ['react-markdown', 'remark-gfm'],
|
||||||
|
|
||||||
// Security headers
|
// Security headers
|
||||||
async headers() {
|
async headers() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue