fix(nuxi): build all types on typecheck command (#5437)

This commit is contained in:
Alex Kozack 2022-08-24 00:04:26 +03:00 committed by GitHub
parent 1347f4b5a0
commit 422d5c4fb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,11 +16,12 @@ export default defineNuxtCommand({
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const rootDir = resolve(args._[0] || '.')
const { loadNuxt } = await loadKit(rootDir)
const { loadNuxt, buildNuxt } = await loadKit(rootDir)
const nuxt = await loadNuxt({ rootDir, config: { _prepare: true } })
// Generate types and close nuxt instance
// Generate types and build nuxt instance
await writeTypes(nuxt)
await buildNuxt(nuxt)
await nuxt.close()
// Prefer local install if possible