diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d9273a7a..d43a2076f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -- Added [Elm](http://elm-lang.org) support. You can now add Elm support via the following methods: +### Fixed +- Update `.babelrc` to fix compilation issues - [#306](https://github.com/rails/webpacker/issues/306) + +### Added +- [Elm](http://elm-lang.org) support. You can now add Elm support via the following methods: - New app: `rails new --webpack=elm` - Within an existing app: `rails webpacker:install:elm` diff --git a/lib/install/config/.babelrc b/lib/install/config/.babelrc index a9cd732a6..67bea12e8 100644 --- a/lib/install/config/.babelrc +++ b/lib/install/config/.babelrc @@ -3,7 +3,8 @@ ["env", { "modules": false, "targets": { - "node": "current" + "browsers": "> 1%", + "uglify": true }, "useBuiltIns": true }] diff --git a/lib/install/template.rb b/lib/install/template.rb index fa600347a..33dc4d2df 100644 --- a/lib/install/template.rb +++ b/lib/install/template.rb @@ -25,7 +25,7 @@ puts "Installing all JavaScript dependencies" run "yarn add webpack webpack-merge js-yaml path-complete-extname " \ "webpack-manifest-plugin babel-loader@7.x coffee-loader coffee-script " \ -"babel-core babel-preset-env compression-webpack-plugin rails-erb-loader glob " \ +"babel-core babel-preset-env babel-polyfill compression-webpack-plugin rails-erb-loader glob " \ "extract-text-webpack-plugin node-sass file-loader sass-loader css-loader style-loader " \ "postcss-loader autoprefixer postcss-smart-import precss"