-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbabel.config.js
More file actions
34 lines (34 loc) · 873 Bytes
/
babel.config.js
File metadata and controls
34 lines (34 loc) · 873 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
34
module.exports = {
compact: true,
presets: [
[
'@babel/env',
{
modules: false,
targets: {
node: 'current',
},
},
],
'@babel/react',
'@babel/typescript',
],
plugins: [
'@babel/proposal-object-rest-spread',
'@babel/proposal-class-properties',
'@babel/proposal-optional-chaining',
'@babel/syntax-dynamic-import',
'@loadable/babel-plugin',
'macros',
['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }],
],
env: {
test: {
plugins: [
'@babel/transform-modules-commonjs',
'@babel/syntax-dynamic-import',
'@babel/plugin-transform-runtime',
],
},
},
};