-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbabel.config.js
More file actions
33 lines (33 loc) · 807 Bytes
/
babel.config.js
File metadata and controls
33 lines (33 loc) · 807 Bytes
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
32
33
const presets = [
['@babel/env', {
targets: {
edge: '17',
firefox: '60',
chrome: '67',
safari: '11.1',
browsers: '> 0.25%'
},
useBuiltIns: 'usage',
}],
'@babel/react'
];
const plugins = [
['import', { libraryName: 'antd-mobile', style: 'css' }], // `style: true` 会加载 less 文件
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-transform-block-scoped-functions',
'@babel/plugin-transform-async-to-generator',
['@babel/plugin-proposal-decorators', {
'legacy': true
}],
['@babel/plugin-proposal-class-properties', {
'loose': true
}],
'@babel/plugin-proposal-function-sent',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-numeric-separator',
'@babel/plugin-proposal-throw-expressions',
];
module.exports = {
presets,
plugins
};