fix(nuxi): backward compatibility for kit <= rc.10 without useNitro (#7593)

This commit is contained in:
Daniel Roe 2022-09-16 18:27:50 +01:00 committed by GitHub
parent 43d1eac09d
commit 2b57bfe36c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,8 @@ export default defineNuxtCommand({
} }
}) })
const nitro = useNitro() // Use ? for backward compatibility for Nuxt <= RC.10
const nitro = useNitro?.()
await clearDir(nuxt.options.buildDir) await clearDir(nuxt.options.buildDir)