fix: support babel corejs config for modern mode (#6070)

This commit is contained in:
Xin Du (Clark) 2019-07-16 11:27:05 +01:00 committed by Pooya Parsa
parent e4ad970584
commit 54cd68dbb0
2 changed files with 3 additions and 16 deletions

View File

@ -47,7 +47,9 @@ module.exports = (context, options = {}) => {
const presets = []
const plugins = []
const modern = Boolean(options.modern)
const modern = options.modern === undefined
? context.env('modern')
: Boolean(options.modern)
const {
polyfills: userPolyfills,

View File

@ -12,19 +12,4 @@ export default class WebpackModernConfig extends WebpackClientConfig {
'process.modern': true
})
}
getBabelOptions () {
return {
...this.buildContext.buildOptions.babel,
envName: this.name,
presets: [
[
require.resolve('@nuxt/babel-preset-app'),
{
modern: true
}
]
]
}
}
}