refactor: use .nuxt/tsconfig.json initial path even for js projects

This commit is contained in:
Sadegh Barati 2024-11-10 22:08:15 +03:30
parent 6a849f5ac8
commit 7a13dd73aa

View File

@ -139,7 +139,7 @@ export async function promptForConfig(
message: (prev, values) => `Where is your ${highlight(values.typescript ? 'tsconfig.json' : 'jsconfig.json')} file?`, message: (prev, values) => `Where is your ${highlight(values.typescript ? 'tsconfig.json' : 'jsconfig.json')} file?`,
initial: (prev, values) => { initial: (prev, values) => {
const prefix = values.framework === 'nuxt' ? '.nuxt/' : './' const prefix = values.framework === 'nuxt' ? '.nuxt/' : './'
const path = values.typescript ? 'tsconfig.json' : 'jsconfig.json' const path = values.framework === 'nuxt' ? 'tsconfig.json' : values.typescript ? 'tsconfig.json' : 'jsconfig.json'
return prefix + path return prefix + path
}, },
}, },