mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +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 GeneratedBy = '// Generated by nuxi'
|
||||||
|
|
||||||
const tsConfigPath = resolve(nuxt.options.buildDir, 'tsconfig.json')
|
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))
|
await fsp.writeFile(tsConfigPath, GeneratedBy + '\n' + JSON.stringify(tsConfig, null, 2))
|
||||||
|
|
||||||
const declarationPath = resolve(nuxt.options.buildDir, 'nuxt.d.ts')
|
const declarationPath = resolve(nuxt.options.buildDir, 'nuxt.d.ts')
|
||||||
|
Loading…
Reference in New Issue
Block a user