forked from react-grid-layout/react-draggable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.babelrc.js
More file actions
32 lines (30 loc) · 743 Bytes
/
Copy path.babelrc.js
File metadata and controls
32 lines (30 loc) · 743 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
29
30
31
32
'use strict';
// If set, we put Babel in "esmMode", i.e. leave import/export intact.
// Good for webpack and for an esm build.
const esmMode = process.env.BABEL_MODULE_TYPE === "module";
const es6Compat = process.env.BABEL_ES_COMPAT === "6";
module.exports = {
"presets": [
[
"@babel/preset-env",
{
// Don't transpile import/export in esmMode.
modules: esmMode ? false : "auto",
targets: es6Compat ? "maintained node versions" : undefined
},
],
"@babel/react",
"@babel/preset-flow"
],
"plugins": [
"@babel/plugin-transform-flow-comments",
"@babel/plugin-proposal-class-properties",
],
"env": {
"test": {
"plugins": [
"espower"
]
}
}
}