Here are my recently learnt tips for advanced usage of the wonderful Webpack
--hot
does not do would you would expect. webpack --watch
and webpack-dev-server
do what you'd expect --hot
to do, even without that option.--lazy
stops WDS from doing what you'd expect --hot
to do.--hot
allows modules (files) to be updated in place, without reloading the webpage.--open
is pretty handy--inline
can be moved to webpack.config.js
require()
: require.ensure()
What I have not answered yet, is what the the advantage of stylesheet bundles is, if the styles are cached in the browser along with the JavaScript bundle?