mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 19:04:48 +00:00
24 lines
491 B
JavaScript
24 lines
491 B
JavaScript
|
import clone from 'lodash/clone'
|
||
|
import WebpackClientConfig from './client'
|
||
|
|
||
|
export default class WebpackModernConfig extends WebpackClientConfig {
|
||
|
constructor(builder) {
|
||
|
super(builder, { name: 'modern', isServer: false, isModern: true })
|
||
|
}
|
||
|
|
||
|
getBabelOptions() {
|
||
|
const options = clone(this.options.build.babel)
|
||
|
|
||
|
options.presets = [
|
||
|
[
|
||
|
require.resolve('@nuxt/babel-preset-app'),
|
||
|
{
|
||
|
modern: true
|
||
|
}
|
||
|
]
|
||
|
]
|
||
|
|
||
|
return options
|
||
|
}
|
||
|
}
|