fix(generator): handle nuxt build --no-build (#7523)

This commit is contained in:
Sébastien Chopin 2020-06-15 21:42:42 +02:00 committed by GitHub
parent 3082567200
commit 68d498b2f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ export default class Generator {
) )
} }
const config = this.getBuildConfig() const config = this.getBuildConfig()
if (!config || config.target !== TARGETS.static) { if (!config || (config.target !== TARGETS.static && !this.options._legacyGenerate)) {
throw new Error( throw new Error(
`In order to use \`nuxt export\`, you need to run \`nuxt build --target static\`` `In order to use \`nuxt export\`, you need to run \`nuxt build --target static\``
) )