-
Notifications
You must be signed in to change notification settings - Fork 11
/
.babelrc.js
43 lines (42 loc) · 1.09 KB
/
.babelrc.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
module.exports = api => {
// This caches the Babel config for faster rebuilds
api.cache.using(() => process.env.NODE_ENV);
return {
presets: [['babel-preset-react-app', { runtime: 'automatic' }]],
plugins: [
['macros'],
['@babel/plugin-transform-runtime'],
[
'babel-plugin-styled-components',
{
ssr: false,
minify: true,
transpileTemplateLiterals: true,
pure: false,
displayName: false,
fileName: false,
preprocess: false,
},
],
[
'module-resolver',
{
alias: {
theme: './src/theme',
components: './src/components',
config: './src/config',
utils: './src/utils',
assets: './src/assets',
store: './src/store',
routes: './src/routes',
contexts: './src/contexts',
hooks: './src/hooks',
constants: './src/constants',
app: './src/app',
pages: './src/app/pages',
},
},
],
],
};
};