From e203df51c0653cf9ccb875cff820d13741ec22dd Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 4 Oct 2017 03:27:58 +0300 Subject: [PATCH] chore: Replace babel-preset-es2015 on babel-preset-env Fixed #931 (#932) --- .babelrc | 10 +++++++++- package.json | 4 ++-- src/input/dependency.js | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.babelrc b/.babelrc index dcbdcf171..d4ef2f468 100644 --- a/.babelrc +++ b/.babelrc @@ -1,5 +1,13 @@ { - "presets": ["es2015", "stage-0", "flow"], + "presets": [ + ["env", { + "targets": { + "node": 4 + }, + "include": ["transform-regenerator"] + }], + "flow" + ], "plugins": ["syntax-async-functions"], "ignore": [ "**/default_theme/assets/*" diff --git a/package.json b/package.json index 6e299d9af..67631e6fc 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "babel-generator": "^6.25.0", "babel-plugin-system-import-transformer": "3.1.0", "babel-plugin-transform-decorators-legacy": "^1.3.4", - "babel-preset-es2015": "^6.16.0", + "babel-preset-env": "^1.6.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", "babel-traverse": "^6.16.0", @@ -141,4 +141,4 @@ "mime" ] } -} \ No newline at end of file +} diff --git a/src/input/dependency.js b/src/input/dependency.js index add94a8f8..7fad0cad9 100644 --- a/src/input/dependency.js +++ b/src/input/dependency.js @@ -38,7 +38,7 @@ function dependencyStream( sourceMap: false, compact: false, presets: [ - require('babel-preset-es2015'), + require('babel-preset-env'), require('babel-preset-stage-0'), require('babel-preset-react') ],