madeagency / reactivity

A Bleeding Edge React Universal Boilerplate for Power Users.
MIT License
79 stars 12 forks source link

HMR chunck styles #126

Open oskarleonard opened 5 years ago

oskarleonard commented 5 years ago

Only main.scss is currenly being hmr, if you change style on a chuncked component there is no hmr.

My curreny "hack" is to replace ExtractCssChunks.loader with style-loader (https://www.npmjs.com/package/style-loader) in webpack.cliend.dev. However server styles gets a bit weird but at least there is hmr so you wont have to refresh the page to see the style changes. In the past i used isomorphic-style-loader on the server, but it doesn't seem to work that good anymore when i upgraded to webpack 4 and upgraded the universal stuff.

However, it would be nice to make it work with hmr and sass the way the universal demo works with .styl.

Im subscribing to this in the meantime if you happen to find a better working way :). Keep up the good work!

oskarleonard commented 5 years ago

Solution https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/issues/111

Add: new ExtractCssChunks({ reloadAll: true }), to webpack.client.dev