mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 23:49:51 +00:00
MDX: Update dev server initialization for Next.js 15.5.1
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-mdx': patch
|
||||
---
|
||||
|
||||
Update dev server initialization for Next.js 15.5.1
|
||||
@@ -43,16 +43,10 @@ export function createMDX({
|
||||
configPath = findConfigFile(),
|
||||
outDir = '.source',
|
||||
}: CreateMDXOptions = {}) {
|
||||
// Next.js performs multiple iteration on the `next.config.js` file
|
||||
// the first time contains the original arguments of `next dev`
|
||||
// we only execute on the first iteration
|
||||
const isDev = process.argv.includes('dev');
|
||||
const isBuild = process.argv.includes('build');
|
||||
|
||||
if ((isDev || isBuild) && process.env._FUMADOCS_MDX !== '1') {
|
||||
if (process.env._FUMADOCS_MDX !== '1') {
|
||||
process.env._FUMADOCS_MDX = '1';
|
||||
|
||||
void start(isDev, configPath, outDir);
|
||||
void start(process.env.NODE_ENV === 'development', configPath, outDir);
|
||||
}
|
||||
|
||||
return (nextConfig: NextConfig = {}): NextConfig => {
|
||||
|
||||
Reference in New Issue
Block a user