-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbabel.config.js
More file actions
30 lines (29 loc) · 1.15 KB
/
babel.config.js
File metadata and controls
30 lines (29 loc) · 1.15 KB
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
const { MIN_SUPPORTED_VERSION } = require('./constants');
module.exports = (api) => {
api.cache(false);
return {
presets: [
['@babel/preset-env', {
targets: {
chrome: String(MIN_SUPPORTED_VERSION.CHROMIUM),
edge: String(MIN_SUPPORTED_VERSION.CHROMIUM),
firefox: String(MIN_SUPPORTED_VERSION.FIREFOX),
opera: String(MIN_SUPPORTED_VERSION.OPERA),
},
}],
'@babel/preset-react',
'@babel/preset-typescript'],
plugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-transform-private-methods', { loose: true }],
['@babel/plugin-transform-private-property-in-object', { loose: true }],
['@babel/plugin-transform-runtime', {
helpers: true,
regenerator: true,
}],
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-export-default-from',
],
};
};