mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
fix(nuxi): ensure buildDir exists before write
This commit is contained in:
parent
bd36e1351a
commit
1ef6e3f525
@ -87,6 +87,7 @@ export const writeTypes = async (nuxt: Nuxt) => {
|
||||
const GeneratedBy = '// Generated by nuxi'
|
||||
|
||||
const tsConfigPath = resolve(nuxt.options.buildDir, 'tsconfig.json')
|
||||
await fsp.mkdir(nuxt.options.buildDir, { recursive: true })
|
||||
await fsp.writeFile(tsConfigPath, GeneratedBy + '\n' + JSON.stringify(tsConfig, null, 2))
|
||||
|
||||
const declarationPath = resolve(nuxt.options.buildDir, 'nuxt.d.ts')
|
||||
|
Loading…
Reference in New Issue
Block a user