fix(builder): nuxt build -a omits webpack-bundle-analyzer options declared in nuxt.config.js (#3390, #3391)

This commit is contained in:
Akos Kovacs 2018-06-06 14:30:22 +02:00 committed by Pooya Parsa
parent 9097ddefda
commit 2e6d503f76

View File

@ -43,7 +43,7 @@ options.dev = false
// Analyze option
options.build = options.build || {}
if (argv.analyze) {
if (argv.analyze && typeof options.build.analyze !== 'object') {
options.build.analyze = true
}
@ -57,7 +57,7 @@ nuxt.hook('error', (_err) => consola.fatal(_err))
const close = () => {
// In analyze mode wait for plugin
// emitting assets and opening browser
if (options.build.analyze === true) {
if (options.build.analyze === true || typeof options.build.analyze === 'object') {
return
}