-
Notifications
You must be signed in to change notification settings - Fork 46
/
babel.config.js
34 lines (33 loc) · 958 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 = api => {
api.cache(() => process.env.NODE_ENV);
return {
presets: [
[
'@babel/preset-env',
{
modules: false,
},
],
'@babel/preset-react',
'@babel/preset-typescript',
],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-transform-flow-strip-types', // Required for jest coverage, for some reason
'@babel/plugin-transform-object-assign',
'@babel/plugin-transform-runtime',
[
'react-intl',
{
messagesDir: './i18n/json',
},
],
],
env: {
test: {
plugins: ['@babel/plugin-transform-modules-commonjs'],
},
},
};
};