-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.config.js
41 lines (39 loc) · 845 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
32
33
34
35
36
37
38
39
40
41
module.exports = function (api) {
// https://github.com/SystemLight/webpack-config/blob/master/packages/webpack-config/src/index.ts#L962
api.assertVersion('~7')
api.cache(true)
let corejs = {
version: 3,
proposals: true
}
return {
comments: true,
presets: [
[
'@babel/env', // @babel/preset-transform-runtime
{
debug: false,
modules: false,
useBuiltIns: 'usage',
ignoreBrowserslistConfig: false,
corejs: corejs
}
],
'@babel/react' // @babel/preset-react
],
plugins: [
[
'@babel/transform-runtime', // @babel/plugin-transform-runtime
{
corejs: corejs
}
],
[
'./plugins/babel-plugin-demo',
{
operator: 'warn'
}
]
]
}
}