-
Notifications
You must be signed in to change notification settings - Fork 30k
Closed
Labels
Markdown (MDX)Related to Markdown with Next.js.Related to Markdown with Next.js.TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.bugIssue was opened via the bug report template.Issue was opened via the bug report template.linear: turbopackConfirmed issue that is tracked by the Turbopack team.Confirmed issue that is tracked by the Turbopack team.locked
Description
Link to the code that reproduces this issue
https://github.com/carloscuesta/next-mdx-turbo-plugins-issue
To Reproduce
- Clone the provided repository
- Install the dependencies
- Run the development server
Current vs. Expected behavior
I'm expecting that the dev server starts normally however the process ends with the following error:
Error: loader /Users/carloscuesta/Downloads/next-mdx-turbo-issue/node_modules/.pnpm/@[email protected]_@[email protected][email protected]_/node_modules/@next/mdx/mdx-rs-loader.js for match "*.mdx" does not have serializable options. Ensure that options passed are plain JavaScript objects and values.
The error doesn't happen when I remove the plugin that I'm passing into the withMDX function:
❌ Error: pnpm run dev --turbopack
export default withMDX({
options: {
remarkPlugins: [remarkGfm]
}
})(nextConfig);✅ No error: pnpm run dev --turbopack
export default withMDX({
options: { remarkPlugins: [] }
})(nextConfig);✅ No error: pnpm run dev (without turbo flag)
export default withMDX({
options: { remarkPlugins: [remarkGfm] }
})(nextConfig);Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000
Available memory (MB): 16384
Available CPU cores: 8
Binaries:
Node: 20.14.0
npm: 10.7.0
Yarn: N/A
pnpm: 9.12.2
Relevant Packages:
next: 15.0.1 // Latest available version is detected (15.0.1).
eslint-config-next: N/A
react: 18.3.1
react-dom: 18.3.1
typescript: N/A
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
Markdown (MDX), Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
noxify, carloscuesta, joshxfi, juliusmarminge, JFDontigny and 22 more
Metadata
Metadata
Assignees
Labels
Markdown (MDX)Related to Markdown with Next.js.Related to Markdown with Next.js.TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.bugIssue was opened via the bug report template.Issue was opened via the bug report template.linear: turbopackConfirmed issue that is tracked by the Turbopack team.Confirmed issue that is tracked by the Turbopack team.locked
