forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.babelrc.js
45 lines (42 loc) · 835 Bytes
/
.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
"use strict";
let envOpts = {
loose: true
};
module.exports = {
comments: false,
plugins: [
// temp until next release
function() {
return {
visitor: {
"Function": function(path) {
const node = path.node;
for (let i = 0; i < node.params.length; i++) {
const param = node.params[i];
if (param.type === "AssignmentPattern") {
param.left.optional = false;
}
}
}
}
};
}
],
presets: [
["env", envOpts],
"stage-0",
"flow"
],
env: {
cov: {
auxiliaryCommentBefore: "istanbul ignore next",
plugins: ["istanbul"]
}
}
};
if (process.env.BABEL_ENV === "development") {
envOpts.targets = {
node: "current"
};
envOpts.debug = true;
}