fix(init): missing mts extension on windows

closes #2886
pull/2889/head
Divyansh Singh 2 years ago
parent 20f9770268
commit 195ebe9464

@ -139,7 +139,7 @@ export function scaffold({
const renderFile = (file: string) => { const renderFile = (file: string) => {
const filePath = path.resolve(templateDir, file) const filePath = path.resolve(templateDir, file)
let targetPath = path.resolve(resolvedRoot, file) let targetPath = path.resolve(resolvedRoot, file)
if (useMjs && targetPath.includes('.vitepress/config')) { if (useMjs && file === '.vitepress/config.js') {
targetPath = targetPath.replace(/\.js$/, '.mjs') targetPath = targetPath.replace(/\.js$/, '.mjs')
} }
if (useTs) { if (useTs) {

Loading…
Cancel
Save