mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(compat): enforce nuxt generate for static target (#148)
This commit is contained in:
parent
5bfacf1f55
commit
fdc0ffef8d
@ -9,6 +9,11 @@ import { resolveMiddleware } from './server/middleware'
|
||||
export default function nuxt2CompatModule () {
|
||||
const { nuxt } = this
|
||||
|
||||
// Ensure we're not just building with 'static' target
|
||||
if (!nuxt.options.dev && nuxt.options.target === 'static' && !nuxt.options._export && !nuxt.options._legacyGenerate) {
|
||||
throw new Error('[nitro] Please use `nuxt generate` for static target')
|
||||
}
|
||||
|
||||
// Disable loading-screen
|
||||
nuxt.options.build.loadingScreen = false
|
||||
nuxt.options.build.indicator = false
|
||||
|
Loading…
Reference in New Issue
Block a user