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:
Bhavik Patel 2026-03-04 13:56:57 +04:00 committed by GitHub
parent 3681420376
commit 0952065172
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -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() {