Skip to content
This repository has been archived by the owner on Mar 14, 2022. It is now read-only.

Commit

Permalink
Replace babel presets with preset-env (#499)
Browse files Browse the repository at this point in the history
This is after running tests to determine that the output is identical for
es2015,2016,2016 and es3 code (output string is deepEquals).

es3 presets are _not_ included in preset-env, but without configuration it is identical
to the es-preset-20xx modules.

It would be nice to have some form of snapshot testing to verify this.
  • Loading branch information
Limess authored and JakeChampion committed Nov 9, 2017
1 parent 065507a commit 1e9247a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 29 deletions.
6 changes: 2 additions & 4 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,11 @@ module.exports = {
options: {
compact: false,

// TODO: Look into using preset-env instead and specifying our minimum versions
// TODO: Look into specifying our minimum versions in preset-env
// for enhanced experience instead of making everything become ES5
presets: [
require.resolve('babel-preset-es3'),
require.resolve('babel-preset-es2015'),
require.resolve('babel-preset-es2016'),
require.resolve('babel-preset-es2017')
require.resolve('babel-preset-env')
],
plugins: [
[
Expand Down
33 changes: 11 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"babel-loader": "^7.1.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2016": "^6.24.1",
"babel-preset-es2017": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-es3": "^1.0.1",
"bower": "^1.8.2",
"bower-resolve-webpack-plugin": "^1.0.4",
Expand Down

0 comments on commit 1e9247a

Please sign in to comment.