Skip to content

Commit 03bc799

Browse files
RavenXcegauravtiwari
authored andcommitted
Update .babelrc (#382)
* Update .babelrc Remove `useBuiltIns` as it is only relevant for use with `babel-polyfill`. Target browsers which have more than 1% usage instead of node. Use `uglify: true` setting as we are using UglifyJS in production. * Add useBuiltIns and babel-polyfill * Update changelog
1 parent 9d579e8 commit 03bc799

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
- Added [Elm](http://elm-lang.org) support. You can now add Elm support via the following methods:
1+
### Fixed
2+
- Update `.babelrc` to fix compilation issues - [#306](https://github.com/rails/webpacker/issues/306)
3+
4+
### Added
5+
- [Elm](http://elm-lang.org) support. You can now add Elm support via the following methods:
26
- New app: `rails new <app> --webpack=elm`
37
- Within an existing app: `rails webpacker:install:elm`
48

lib/install/config/.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
["env", {
44
"modules": false,
55
"targets": {
6-
"node": "current"
6+
"browsers": "> 1%",
7+
"uglify": true
78
},
89
"useBuiltIns": true
910
}]

lib/install/template.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
puts "Installing all JavaScript dependencies"
2626
run "yarn add webpack webpack-merge js-yaml path-complete-extname " \
2727
"webpack-manifest-plugin [email protected] coffee-loader coffee-script " \
28-
"babel-core babel-preset-env compression-webpack-plugin rails-erb-loader glob " \
28+
"babel-core babel-preset-env babel-polyfill compression-webpack-plugin rails-erb-loader glob " \
2929
"extract-text-webpack-plugin node-sass file-loader sass-loader css-loader style-loader " \
3030
"postcss-loader autoprefixer postcss-smart-import precss"
3131

0 commit comments

Comments
 (0)