Skip to content

Commit

Permalink
fix(nuxi): create buildDir before writing types (nuxt#1930)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Nov 15, 2021
1 parent 33107d8 commit 36f3691
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/nuxi/src/commands/prepare.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { resolve } from 'pathe'
import { clearDir } from '../utils/fs'
import { loadKit } from '../utils/kit'
import { writeTypes } from '../utils/prepare'
import { defineNuxtCommand } from './index'
Expand All @@ -15,6 +16,7 @@ export default defineNuxtCommand({

const { loadNuxt } = await loadKit(rootDir)
const nuxt = await loadNuxt({ rootDir })
await clearDir(nuxt.options.buildDir)

await writeTypes(nuxt)
}
Expand Down

0 comments on commit 36f3691

Please sign in to comment.