mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
fix: support babel corejs config for modern mode (#6070)
This commit is contained in:
parent
e4ad970584
commit
54cd68dbb0
@ -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,
|
||||
|
@ -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
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user