-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
.babelrc
32 lines (32 loc) · 984 Bytes
/
.babelrc
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
// This file is formatted as JSON5 https://github.com/json5/json5
{
sourceType: 'unambiguous',
presets: [
// Transforms JSX
'@babel/preset-react',
// Transforms ES6 code and import/export statements
[
'@babel/preset-env',
{
targets: {
electron: '22.3.2'
},
// Only use polyfills necessary for target env
useBuiltIns: 'usage',
corejs: 3,
shippedProposals: true,
modules: false
}
]
],
plugins: [
// Allows directly declaring props and methods on a class instead of
// binding them to `this` in the constructor
'@babel/plugin-proposal-class-properties',
// Allows simpler defineMessages with react-intl
// https://github.com/akameco/babel-plugin-react-intl-auto
['react-intl-auto', { filebase: true, removePrefix: 'src' }],
// Reduces bundle size by sharing babel helpers between files
['@babel/plugin-transform-runtime', { corejs: 3 }]
]
}