Wonderful Webpack tips
1 Jan 0001
One-minute read
Here are my recently learnt tips for advanced usage of the wonderful Webpack
--hotdoes not do would you would expect.webpack --watchandwebpack-dev-serverdo what you'd expect--hotto do, even without that option.--lazystops WDS from doing what you'd expect--hotto do.--hotallows modules (files) to be updated in place, without reloading the webpage.--openis pretty handy--inlinecan be moved towebpack.config.js- Webpack has built in support for lazy loading through the AMD spec for
require():require.ensure() - Support for multiple bundles (entry points) is beautiful
- WDS serves up static files if you keep them in the context path, with no additional config
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?