Skip to content

Commit 223b549

Browse files
committed
Rename webpack rails config file back to webpack.rails.config.js
1 parent e979382 commit 223b549

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ Observe how the bundles are automatically re-generated whenever your JSX changes
5353

5454
```
5555
cd webpack
56-
webpack -w --config webpack.bundle.config.js
56+
webpack -w --config webpack.rails.config.js
5757
```
5858

5959
Make sure to invoke your local copy of the webpack executable as opposed
6060
to any globally installed webpack.
6161
See https://github.com/webpack/extract-text-webpack-plugin/blob/master/example/webpack.config.js
6262
If in doubt, run the following command:
6363
```
64-
$(npm bin)/webpack -w --config webpack.bundle.config.js
64+
$(npm bin)/webpack -w --config webpack.rails.config.js
6565
```
6666

6767
## Run Rails server
@@ -81,7 +81,7 @@ It's important to run the Rails server on a different port than the node server.
8181

8282
# Webpack configuration
8383
- `webpack.hot.config.js`: Used by server.js to run the demo express server.
84-
- `webpack.bundle.config.js`: Used to generate the Rails bundles.
84+
- `webpack.rails.config.js`: Used to generate the Rails bundles.
8585
- `webpack.common.config.js`: Common configuration file to minimize code duplication.
8686

8787
# Bootstrap integration
@@ -123,7 +123,7 @@ customize the Bootstrap Sass variables.
123123

124124
# Notes on Rails assets
125125
## Javascript
126-
The `webpack.bundle.config.js` file generates rails-bundle.js which is then included
126+
The `webpack.rails.config.js` file generates rails-bundle.js which is then included
127127
by the Rails asset pipeline.
128128

129129
## Sass and images

app/assets/javascripts/application.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717

1818
// Important to import jquery_ujs before rails-bundle as that patches jquery xhr to use the authenticity token!
1919

20-
//= require rails-bundle
20+
//= require webpack-bundle
2121
//= require turbolinks

webpack/scripts/rails_only.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @jsx React.DOM */
22

3-
// This could be done here, but instead it's done in the webpack.bundle.config.js file
3+
// This could be done here, but instead it's done in the webpack.rails.config.js file
44
// Showing this for example purposes
55
// require("expose?$!jquery");
66
// require("expose?jQuery!jquery");

webpack/webpack.hot.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ config.entry.push("webpack-dev-server/client?http://localhost:3000",
88
"webpack/hot/dev-server",
99
"./scripts/webpack_only",
1010
"bootstrap-sass!./bootstrap-sass.config.js"); // custom bootstrap
11-
//"bootstrap-sass-loader" -> all bootstrap assets
1211
config.output = { filename: "express-bundle.js", // this file is served directly by webpack
1312
path: __dirname };
1413
config.plugins = [ new webpack.HotModuleReplacementPlugin() ];

webpack/webpack.bundle.config.js renamed to webpack/webpack.rails.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Run like this:
2-
// cd webpack && $(npm bin)/webpack -w --config webpack.bundle.config.js
2+
// cd webpack && $(npm bin)/webpack -w --config webpack.rails.config.js
33
// Note that Foreman (Procfile.dev) has also been configured to take care of this.
44

55
var config = require("./webpack.common.config");
66

77
config.entry.push("./scripts/rails_only"); // rails specific assets
8-
config.output = { filename: "rails-bundle.js",
8+
config.output = { filename: "webpack-bundle.js",
99
path: "../app/assets/javascripts" };
1010
config.externals = { jquery: "var jQuery" }; // load jQuery from cdn or rails asset pipeline
1111
config.module.loaders.push(

0 commit comments

Comments
 (0)