Skip to content

Commit 98894c7

Browse files
committed
Merge pull request shakacode#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

+1-2
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

+2-1
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)