-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.babelrc.js
46 lines (46 loc) · 1.17 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
44
45
46
module.exports = {
presets: ['next/babel'],
plugins: [
// Support TypeScript decorators (required for TypeGraphQL)
'babel-plugin-transform-typescript-metadata',
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
'babel-plugin-parameter-decorator',
// Resolve imports to top level directory for better tree shaking.
[
'babel-plugin-transform-imports',
{
'@material-ui/core': {
transform: '@material-ui/core/${member}',
preventFullImport: true,
},
'@material-ui/icons': {
transform: '@material-ui/icons/${member}',
preventFullImport: true,
},
'@material-ui/lab': {
transform: '@material-ui/lab/${member}',
preventFullImport: true,
},
},
],
],
ignore: ['node_modules', 'public'],
env: {
test: {
presets: [
[
'next/babel',
{
'preset-env': {
targets: {
node: 'current',
},
modules: 'commonjs',
},
},
],
],
},
},
};