1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Add babel-preset-latest support. (#1027)

* Add babel-preset-2016 support.
This adds the support for Exponentiation operator (**)

* Use babel-preset-latest.

* Remove babel-plugin-transform-async-to-generator in favor of babel-plugin-latest
It has es2017 preset and it comes with the above plugin.
This commit is contained in:
Arunoda Susiripala 2017-02-08 17:35:25 +05:30 committed by Tim Neutkens
parent 4a73ccbb00
commit 55f48563a0
3 changed files with 31 additions and 12 deletions

View file

@ -48,12 +48,11 @@
"babel-loader": "6.2.10",
"babel-plugin-module-resolver": "2.5.0",
"babel-plugin-react-require": "^3.0.0",
"babel-plugin-transform-async-to-generator": "6.22.0",
"babel-plugin-transform-class-properties": "6.22.0",
"babel-plugin-transform-es2015-modules-commonjs": "6.22.0",
"babel-plugin-transform-object-rest-spread": "6.22.0",
"babel-plugin-transform-runtime": "6.22.0",
"babel-preset-es2015": "6.22.0",
"babel-preset-latest": "6.22.0",
"babel-preset-react": "6.22.0",
"babel-runtime": "6.22.0",
"case-sensitive-paths-webpack-plugin": "1.1.4",
@ -94,6 +93,7 @@
"cheerio": "^0.22.0",
"chromedriver": "^2.26.1",
"coveralls": "2.11.16",
"cross-env": "^3.1.4",
"gulp": "3.9.1",
"gulp-babel": "6.1.2",
"gulp-benchmark": "1.1.1",
@ -107,10 +107,7 @@
"run-sequence": "1.2.2",
"standard": "8.6.0",
"wd": "^1.1.3",
"webpack-stream": "3.2.0",
"cross-env": "^3.1.4",
"react": "15.4.2",
"react-dom": "15.4.2"
"webpack-stream": "3.2.0"
},
"peerDependencies": {
"react": "^15.4.2",

View file

@ -3,12 +3,13 @@ const babelRuntimePath = require.resolve('babel-runtime/package')
module.exports = {
presets: [
[require.resolve('babel-preset-es2015'), { modules: false }],
[require.resolve('babel-preset-latest'), {
'es2015': { modules: false }
}],
require.resolve('babel-preset-react')
],
plugins: [
require.resolve('babel-plugin-react-require'),
require.resolve('babel-plugin-transform-async-to-generator'),
require.resolve('babel-plugin-transform-object-rest-spread'),
require.resolve('babel-plugin-transform-class-properties'),
require.resolve('babel-plugin-transform-runtime'),

View file

@ -509,11 +509,11 @@ babel-plugin-syntax-object-rest-spread@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
babel-plugin-syntax-trailing-function-commas@^6.13.0:
babel-plugin-syntax-trailing-function-commas@^6.13.0, babel-plugin-syntax-trailing-function-commas@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
babel-plugin-transform-async-to-generator@6.22.0, babel-plugin-transform-async-to-generator@^6.8.0:
babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.8.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.22.0.tgz#194b6938ec195ad36efc4c33a971acf00d8cd35e"
dependencies:
@ -698,7 +698,7 @@ babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es20
babel-runtime "^6.22.0"
regexpu-core "^2.0.0"
babel-plugin-transform-exponentiation-operator@^6.8.0:
babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.8.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.22.0.tgz#d57c8335281918e54ef053118ce6eb108468084d"
dependencies:
@ -804,7 +804,7 @@ babel-preset-env@1.1.8:
babel-plugin-transform-regenerator "^6.6.0"
browserslist "^1.4.0"
babel-preset-es2015@6.22.0:
babel-preset-es2015@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.22.0.tgz#af5a98ecb35eb8af764ad8a5a05eb36dc4386835"
dependencies:
@ -833,12 +833,33 @@ babel-preset-es2015@6.22.0:
babel-plugin-transform-es2015-unicode-regex "^6.22.0"
babel-plugin-transform-regenerator "^6.22.0"
babel-preset-es2016@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-preset-es2016/-/babel-preset-es2016-6.22.0.tgz#b061aaa3983d40c9fbacfa3743b5df37f336156c"
dependencies:
babel-plugin-transform-exponentiation-operator "^6.22.0"
babel-preset-es2017@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.22.0.tgz#de2f9da5a30c50d293fb54a0ba15d6ddc573f0f2"
dependencies:
babel-plugin-syntax-trailing-function-commas "^6.22.0"
babel-plugin-transform-async-to-generator "^6.22.0"
babel-preset-jest@^18.0.0:
version "18.0.0"
resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-18.0.0.tgz#84faf8ca3ec65aba7d5e3f59bbaed935ab24049e"
dependencies:
babel-plugin-jest-hoist "^18.0.0"
babel-preset-latest@6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-preset-latest/-/babel-preset-latest-6.22.0.tgz#47b800531350a3dc69126e8c375a40655cd1eeff"
dependencies:
babel-preset-es2015 "^6.22.0"
babel-preset-es2016 "^6.22.0"
babel-preset-es2017 "^6.22.0"
babel-preset-react@6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.22.0.tgz#7bc97e2d73eec4b980fb6b4e4e0884e81ccdc165"