-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathbabel.config.js
45 lines (45 loc) · 1.04 KB
/
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
42
43
44
45
/* Babel config for the main process */
module.exports = (api) => {
api.cache(true);
return ({
presets: [
[
'@babel/preset-env',
{
targets: {
electron: '4.1.4',
},
modules: 'commonjs',
useBuiltIns: 'usage',
// debug: true,
},
],
],
plugins: [
'babel-plugin-redux-saga',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-do-expressions',
[
// used only for babel helpers
'@babel/plugin-transform-runtime',
{
// regenerator runtime should be used from global polyfill
regenerator: false,
},
],
[
// uset for
'module-resolver',
{
alias: {
shared: './app/shared',
config: './app/config',
},
},
],
],
});
};