Skip to content

Commit 98894c7

Browse files
committed
Merge pull request #131 from shakacode/justin808-remove-es5shim-applicationjs
Drop es5-shim from application.js since it's already being loaded in Webpack
2 parents 9a4e771 + 48218b3 commit 98894c7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/assets/javascripts/application.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
1111
// about supported directives.
1212

13-
// Need to be on top to allow Poltergeist test to work with React.
14-
//= require es5-shim/es5-shim
13+
// Need to be on top to allow Poltergeist test to work with React: es5-shim/es5-shim. This is lincluded in app-bundle.
1514
//= require react_on_rails
1615

1716
// It is important that generated/vendor-bundle must be before bootstrap since it is exposing jQuery and jQuery-ujs

client/webpack.client.rails.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ config.entry.app.push('./app/startup/clientGlobals');
2424
// See webpack.common.config for adding modules common to both the webpack dev server and rails
2525

2626
config.module.loaders.push(
27-
{test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/}
27+
{test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/},
28+
{test: require.resolve('react'), loader: 'imports?shim=es5-shim/es5-shim&sham=es5-shim/es5-sham'}
2829
);
2930

3031
module.exports = config;

0 commit comments

Comments
 (0)