mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
fix(nuxi): write types after nuxt is ready (#1551)
This commit is contained in:
parent
2eeaa8d702
commit
d623fc0419
@ -51,9 +51,9 @@ export default defineNuxtCommand({
|
|||||||
}
|
}
|
||||||
const newNuxt = await loadNuxt({ rootDir, dev: true, ready: false })
|
const newNuxt = await loadNuxt({ rootDir, dev: true, ready: false })
|
||||||
await clearDir(newNuxt.options.buildDir)
|
await clearDir(newNuxt.options.buildDir)
|
||||||
writeTypes(newNuxt).catch(console.error)
|
|
||||||
currentNuxt = newNuxt
|
currentNuxt = newNuxt
|
||||||
await currentNuxt.ready()
|
await currentNuxt.ready()
|
||||||
|
writeTypes(currentNuxt).catch(console.error)
|
||||||
await buildNuxt(currentNuxt)
|
await buildNuxt(currentNuxt)
|
||||||
server.setApp(currentNuxt.server.app)
|
server.setApp(currentNuxt.server.app)
|
||||||
if (isRestart && args.clear !== false) {
|
if (isRestart && args.clear !== false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user