Skip to content

Commit b168abd

Browse files
committed
Merge pull request #171 from shakacode/andy/169-fix-generator-jquery-config
remove jquery_ujs dependency to fix #169
2 parents a19a14a + a58856a commit b168abd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/generators/react_on_rails/templates/base/base/client/webpack.client.base.config.js.tt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = {
1717
vendor: [
1818
'babel-core/polyfill',
1919
'jquery',
20-
'jquery-ujs',
2120
'react',
2221
'react-dom',
2322
],

lib/generators/react_on_rails/templates/base/base/client/webpack.client.rails.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ config.entry.vendor.unshift(
1919
'es5-shim/es5-sham'
2020
);
2121

22-
// See webpack.common.config for adding modules common to both the webpack dev server and rails
22+
// jquery-ujs MUST GO AFTER jquery, so must use 'push'
23+
config.entry.app.push('jquery-ujs');
2324

25+
// See webpack.common.config for adding modules common to both the webpack dev server and rails
2426
config.module.loaders.push(
2527
{test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/},
2628
{test: require.resolve('react'), loader: 'imports?shim=es5-shim/es5-shim&sham=es5-shim/es5-sham'}

0 commit comments

Comments
 (0)