@@ -2,10 +2,6 @@ import bundleAnalyzer from '@next/bundle-analyzer'
22import createMDX from '@next/mdx'
33import type { NextConfig } from 'next'
44import createNextIntlPlugin from 'next-intl/plugin'
5- import rehypeHighlight from 'rehype-highlight'
6- import remarkFrontmatter from 'remark-frontmatter'
7- import remarkGfm from 'remark-gfm'
8- import remarkMdxFrontmatter from 'remark-mdx-frontmatter'
95
106const withNextIntl = createNextIntlPlugin ( './src/i18n/request.ts' )
117
@@ -91,10 +87,17 @@ const nextConfig: NextConfig = {
9187 ignoreBuildErrors : false ,
9288 } ,
9389
94- // ESLint configuration
95- eslint : {
96- // Set to true only if you want to skip linting during build
97- ignoreDuringBuilds : false ,
90+ // Rewrites to fix locale-prefixed static assets in dev mode
91+ async rewrites ( ) {
92+ return {
93+ beforeFiles : [
94+ // Rewrite locale-prefixed _next paths to correct paths
95+ {
96+ source : '/:locale/_next/:path*' ,
97+ destination : '/_next/:path*' ,
98+ } ,
99+ ] ,
100+ }
98101 } ,
99102
100103 // Redirects configuration
@@ -164,8 +167,14 @@ const nextConfig: NextConfig = {
164167const withMDX = createMDX ( {
165168 extension : / \. m d x ? $ / ,
166169 options : {
167- remarkPlugins : [ remarkFrontmatter , remarkMdxFrontmatter , remarkGfm ] ,
168- rehypePlugins : [ rehypeHighlight ] ,
170+ // String-based config for Turbopack compatibility (Next.js 16+)
171+ remarkPlugins : [
172+ 'remark-frontmatter' , // Parse and hide YAML frontmatter
173+ 'remark-gfm' , // GitHub Flavored Markdown (tables, task lists, etc.)
174+ ] ,
175+ rehypePlugins : [
176+ 'rehype-highlight' , // Code syntax highlighting
177+ ] ,
169178 } ,
170179} )
171180
0 commit comments