refactor: change quiet log mode after options validated

This commit is contained in:
Clark Du 2018-08-13 17:16:25 +01:00
parent c55f213743
commit 09188dd173
2 changed files with 5 additions and 4 deletions

View File

@ -25,6 +25,7 @@ export default {
},
// Dirs
srcDir: undefined,
buildDir: '.nuxt',
nuxtDir,
nuxtAppDir: path.resolve(nuxtDir, 'lib', 'app'),

View File

@ -190,10 +190,6 @@ Options.from = function (_options) {
options.build.optimization.splitChunks.name = true
}
if (options.build.quiet === true) {
consola.level = 0
}
if (options.build.stats === 'none' || options.build.quiet === true) {
options.build.stats = false
}
@ -213,5 +209,9 @@ Options.from = function (_options) {
options.build.transpile = [].concat(options.build.transpile || [])
.map(module => module instanceof RegExp ? module : new RegExp(module))
if (options.build.quiet === true) {
consola.level = 0
}
return options
}