-
Notifications
You must be signed in to change notification settings - Fork 1
/
babel.config.js
31 lines (28 loc) · 909 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
31
'use strict'
// const isProduction = process.env.NODE_ENV === 'production';
const plugins = [
['@babel/plugin-transform-runtime', { corejs: 3, proposals: true, useESModules: true, regenerator: false }],
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-numeric-separator',
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-nullish-coalescing-operator',
['import', { libraryName: 'vant', libraryDirectory: 'es', style: true }, 'vant']
];
module.exports = {
presets: [
['@babel/preset-env', {
modules: false,
targets: {
browsers: ['android >= 4.4', 'ios >= 8', '> 1%'],
node: 'current'
},
useBuiltIns: 'usage',
corejs: 3
}],
'@vue/babel-preset-jsx'
],
compact: false,
plugins
};