Skip to content

Commit f504b42

Browse files
yeojzbiilmann
authored andcommitted
feat: switch to preset-env instead of es2015
1 parent dc17ea7 commit f504b42

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Diff for: lib/build.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ function webpackConfig(dir, additionalConfig) {
88
var config = conf.load();
99
var babelOpts = {cacheDirectory: true};
1010
if (!fs.existsSync(path.join(process.cwd(), '.babelrc'))) {
11-
babelOpts.presets = ["es2015"];
11+
babelOpts.presets = [
12+
["env", {
13+
targets: {
14+
node: "6.10"
15+
}
16+
}]
17+
];
1218
babelOpts.plugins = [
1319
"transform-class-properties",
1420
"transform-object-assign",

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"babel-plugin-transform-class-properties": "^6.24.1",
2626
"babel-plugin-transform-object-assign": "^6.22.0",
2727
"babel-plugin-transform-object-rest-spread": "^6.26.0",
28-
"babel-preset-es2015": "^6.24.1",
28+
"babel-preset-env": "^1.6.1",
2929
"base-64": "^0.1.0",
3030
"body-parser": "^1.18.2",
3131
"commander": "^2.11.0",

0 commit comments

Comments
 (0)