mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
fix(nuxi): ignore static check with prepare
command (#1971)
This commit is contained in:
parent
49179d2d8d
commit
496ea09777
@ -11,7 +11,7 @@ export function setupNitroBridge () {
|
||||
const nuxt = useNuxt()
|
||||
|
||||
// Ensure we're not just building with 'static' target
|
||||
if (!nuxt.options.dev && nuxt.options.target === 'static' && !nuxt.options._export && !nuxt.options._legacyGenerate) {
|
||||
if (!nuxt.options.dev && nuxt.options.target === 'static' && !nuxt.options._prepare && !nuxt.options._export && !nuxt.options._legacyGenerate) {
|
||||
throw new Error('[nitro] Please use `nuxt generate` for static target')
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ export default defineNuxtCommand({
|
||||
const rootDir = resolve(args._[0] || '.')
|
||||
|
||||
const { loadNuxt } = await loadKit(rootDir)
|
||||
const nuxt = await loadNuxt({ rootDir })
|
||||
const nuxt = await loadNuxt({ rootDir, config: { _prepare: true } })
|
||||
await clearDir(nuxt.options.buildDir)
|
||||
|
||||
await writeTypes(nuxt)
|
||||
|
Loading…
Reference in New Issue
Block a user