forked from JSON-Drived-Configurable-Platform/cp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
34 lines (33 loc) · 875 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
module.exports = function (api) {
// errors will throw without using cache Api
api.cache(true);
const presets = [
[
'@babel/preset-env',
{
modules: false,
loose: true,
useBuiltIns: 'usage',
'corejs': 2,
targets: {
browsers: [
'Chrome >= 60',
'Safari >= 10.1',
'iOS >= 10.3',
'Firefox >= 54',
'Edge >= 17'
]
}
}
]
];
const plugins = [
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-syntax-dynamic-import'
];
return {
presets,
plugins
};
};