mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
deprecate: remove options.dev in build.extend()
This commit is contained in:
parent
90d9283e70
commit
e0005dddea
@ -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
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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)
|
||||
})
|
||||
|
7
test/fixtures/deprecate/nuxt.config.js
vendored
7
test/fixtures/deprecate/nuxt.config.js
vendored
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user