Permalink
Browse files

Add Webpack Hotloading

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 Mar 22, 2015
1 parent 1c1b94b commit 2277952e562891e37872a29fff64f96ca3b1fd60
Showing with 3 additions and 2 deletions.
  1. +1 −1 DevProcfile
  2. +1 −1 app/assets/package.json
  3. +1 −0 app/assets/webpack.config.js
@@ -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
@@ -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",
@@ -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'
]
},

0 comments on commit 2277952

Please sign in to comment.