deprecate: remove options.dev in build.extend()

This commit is contained in:
Clark Du 2018-03-15 17:37:43 +08:00
parent 90d9283e70
commit e0005dddea
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
4 changed files with 1 additions and 22 deletions

View File

@ -137,10 +137,6 @@ module.exports = function webpackClientConfig() {
if (typeof this.options.build.extend === 'function') {
const isDev = this.options.dev
const extendedConfig = this.options.build.extend.call(this, config, {
get dev() {
printWarn('dev has been deprecated in build.extend(), please use isDev')
return isDev
},
isDev,
isClient: true
})

View File

@ -75,10 +75,6 @@ module.exports = function webpackServerConfig() {
if (typeof this.options.build.extend === 'function') {
const isDev = this.options.dev
const extendedConfig = this.options.build.extend.call(this, config, {
get dev() {
printWarn('dev has been deprecated in build.extend(), please use isDev')
return isDev
},
isDev,
isServer: true
})

View File

@ -27,14 +27,6 @@ test.serial('Init Nuxt.js', async t => {
t.true(buildSpies.log.calledWithMatch('OPEN'))
})
test.serial('Deprecated: dev in build.extend()', async t => {
t.true(
buildSpies.warn.calledWithMatch(
'dev has been deprecated in build.extend(), please use isDev'
)
)
})
test.serial('Deprecated: nuxt.plugin()', async t => {
t.true(nuxt.__builder_plugin)
})

View File

@ -1,11 +1,6 @@
module.exports = {
modules: ['~/modules/deprecated-apis'],
build: {
stats: false,
extend(config, options) {
if (options.dev) {
// Please use isDev instead of dev
}
}
stats: false
}
}