refactor: stats none is same as false

This commit is contained in:
Clark Du 2018-03-29 15:11:34 +08:00
parent 948d56622e
commit ed321f52c1
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
3 changed files with 12 additions and 3 deletions

View File

@ -183,6 +183,10 @@ Options.from = function (_options) {
options.build.optimization.splitChunks.name = true
}
if (options.build.stats === 'none') {
options.build.stats = false
}
// TODO: remove when mini-css-extract-plugin supports HMR
if (options.dev) {
options.build.extractCSS = false

View File

@ -7,8 +7,13 @@ let nuxt = null
describe('basic dev', () => {
beforeAll(async () => {
const config = loadFixture('basic', { buildDir: '.nuxt-dev' })
config.dev = true
const config = loadFixture('basic', {
dev: true,
buildDir: '.nuxt-dev',
build: {
stats: 'none'
}
})
nuxt = new Nuxt(config)
new Builder(nuxt).build()
port = await getPort()

View File

@ -6,7 +6,7 @@ export const buildFixture = function buildFixture(fixture) {
test: true,
minimalCLI: true,
build: {
stats: false
stats: 'errors-only'
}
})
const nuxt = new Nuxt(config)