From 48218b3a36492bef7cd3322d7763470ac183e28c Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Wed, 28 Oct 2015 19:25:31 -0700 Subject: [PATCH] Update application.js --- app/assets/javascripts/application.js | 3 +-- client/webpack.client.rails.config.js | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index fa8e53ef..71aae88d 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -10,8 +10,7 @@ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details // about supported directives. -// Need to be on top to allow Poltergeist test to work with React. -//= require es5-shim/es5-shim +// Need to be on top to allow Poltergeist test to work with React: es5-shim/es5-shim. This is lincluded in app-bundle. //= require react_on_rails // It is important that generated/vendor-bundle must be before bootstrap since it is exposing jQuery and jQuery-ujs diff --git a/client/webpack.client.rails.config.js b/client/webpack.client.rails.config.js index 96db2643..a7d4b170 100644 --- a/client/webpack.client.rails.config.js +++ b/client/webpack.client.rails.config.js @@ -24,7 +24,8 @@ config.entry.app.push('./app/startup/clientGlobals'); // See webpack.common.config for adding modules common to both the webpack dev server and rails config.module.loaders.push( - {test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/} + {test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/}, + {test: require.resolve('react'), loader: 'imports?shim=es5-shim/es5-shim&sham=es5-shim/es5-sham'} ); module.exports = config;