Skip to content

Commit

Permalink
Add Webpack Hotloading
Browse files Browse the repository at this point in the history
By using `webpack-dev-server --config app/assets/webpack.config.js --progress --inline --module-bind --hot`
you should now be able to take advantage of hot loading, i.e. you
should notice that changing your client_application.cjsx will cause
the page to reload. When using React components, they should simply
reload without a full page refresh
  • Loading branch information
nambrot committed Apr 1, 2015
1 parent 1c1b94b commit 2277952
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DevProcfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: rails s
webpack: webpack-dev-server --config app/assets/webpack.config.js --progress --inline
webpack: webpack-dev-server --config app/assets/webpack.config.js --progress --inline --module-bind --hot
2 changes: 1 addition & 1 deletion app/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"devDependencies": {
"webpack": "~1.4.13",
"webpack-dev-server": "*",
"react-hot-loader": "0.5.0",
"react-hot-loader": "*",
"jsx-loader": "*",
"css-loader": "*",
"expose-loader": "~0.6.0",
Expand Down
1 change: 1 addition & 0 deletions app/assets/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
entry: {
App: [
'webpack-dev-server/client?http://localhost:8080/assets/',
'webpack/hot/only-dev-server',
'./javascripts/client_application.cjsx'
]
},
Expand Down

0 comments on commit 2277952

Please sign in to comment.