-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathbabel.config.js
30 lines (30 loc) · 986 Bytes
/
babel.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module.exports = {
presets: [
[
'@babel/preset-env',
{
corejs: 3,
useBuiltIns: 'usage',
modules: false,
//开发环境,不做es6转换,以便于调试
targets: process.env.NODE_ENV === 'development' ? 'fully supports es6' : 'browserslist config'
}
],
'@vue/babel-preset-jsx', // for babel7
],
plugins: [
//'@babel/plugin-syntax-dynamic-import',
//'@babel/plugin-transform-runtime', //用了useBuiltIns不需要它
//['@babel/plugin-proposal-class-properties'],
//babel7不用这个:'@vue/babel-plugin-transform-vue-jsx',
[
'babel-plugin-component',
{
libraryName: 'element-ui',
styleLibraryName: '~node_modules/element-ui/packages/theme-chalk/src',
ext: '.scss'
}
]
],
comments: false,
}