fix(nuxt): always write nitro types when building (#6035)

This commit is contained in:
Daniel Roe 2022-07-21 14:50:41 +01:00 committed by GitHub
parent 8f7b9f904e
commit 54e672db19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,7 +141,7 @@ export async function initNitro (nuxt: Nuxt) {
// Add typed route responses
nuxt.hook('prepare:types', async (opts) => {
if (nuxt.options._prepare) {
if (!nuxt.options.dev) {
await scanHandlers(nitro)
await writeTypes(nitro)
}