File tree 2 files changed +13
-9
lines changed
2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,6 @@ webpack-bundle.js.map
20
20
.env
21
21
/node_modules
22
22
npm-debug.log
23
+
24
+ # Ignore bundle dependencies
25
+ vendor /ruby
Original file line number Diff line number Diff line change @@ -43,22 +43,23 @@ the browser.
43
43
# Rails integration
44
44
45
45
## Build JS/CSS bundles
46
- Run this command to have webpack build the JS/CSS bundles and have them saved in the Rails
47
- asset pipeline (app/assets).
48
- Although not shown in this tutorial, the Webpack ExtractTextPlugin can optionally be used
49
- to extract the CSS out of the JS bundle.
46
+ If not already done, run ` npm install ` to install all node dependencies.
47
+
48
+ Then instruct webpack to build the JS/CSS bundles and have them saved in the
49
+ Rails asset pipeline (app/assets). Although not shown in this tutorial, the
50
+ Webpack ExtractTextPlugin can optionally be used to extract the CSS out of
51
+ the JS bundle.
52
+
53
+ ```
54
+ cd webpack && webpack -w --config webpack.rails.config.js
55
+ ```
50
56
51
57
The following bundles are generated:
52
58
- webpack-bundle.js which gets saved to app/assets/javascripts
53
59
- bootstrap-and-customizations.css which gets saved in app/assets/stylesheets
54
60
55
61
Observe how the bundles are automatically re-generated whenever your JSX changes.
56
62
57
- ```
58
- cd webpack
59
- webpack -w --config webpack.rails.config.js
60
- ```
61
-
62
63
Make sure to invoke your local copy of the webpack executable as opposed
63
64
to any globally installed webpack.
64
65
See https://github.com/webpack/extract-text-webpack-plugin/blob/master/example/webpack.config.js
You can’t perform that action at this time.
0 commit comments