diff --git a/src/node/init/init.ts b/src/node/init/init.ts index 610ed5f0..774e528b 100644 --- a/src/node/init/init.ts +++ b/src/node/init/init.ts @@ -139,7 +139,7 @@ export function scaffold({ const renderFile = (file: string) => { const filePath = path.resolve(templateDir, file) let targetPath = path.resolve(resolvedRoot, file) - if (useMjs && targetPath.includes('.vitepress/config')) { + if (useMjs && file === '.vitepress/config.js') { targetPath = targetPath.replace(/\.js$/, '.mjs') } if (useTs) {