forked from getsentry/sentry
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbabel.config.js
More file actions
28 lines (28 loc) · 975 Bytes
/
babel.config.js
File metadata and controls
28 lines (28 loc) · 975 Bytes
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
/*eslint-env node*/
module.exports = {
presets: ['@babel/react', '@babel/env'],
plugins: [
'emotion',
'lodash',
'react-hot-loader/babel',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-runtime',
// NOTE: The order of the decorator and class-property plugins is important
// here. Decorators must be processed first before class properties, see:
// https://babeljs.io/docs/en/plugins#plugin-ordering
['@babel/plugin-proposal-decorators', {legacy: true}],
['@babel/plugin-proposal-class-properties', {loose: true}],
['babel-plugin-transform-builtin-extend', {globals: ['Array', 'Error']}],
],
env: {
production: {},
development: {
plugins: [['emotion', {sourceMap: true, autoLabel: true}]],
},
test: {
plugins: [['emotion', {autoLabel: true}], 'dynamic-import-node'],
},
},
};