webpack-split-css
webpack-split-css copied to clipboard
Attempts to isolate perceived issue with bundle splitting css in Webpack.
When using Webpack with bundle-loader and style-loader, I've been unable to automatically split CSS.
This has led to leveraging allChunks: true (and thus preloading unnecessary CSS with initial payload).
I've had trouble conveying this difficulty over 140 characters on Twitter, so I created this small repo to demonstrate this issue.
My hope is that I'm just missing something obvious.
Installation:
- Check out the repo.
- yarn
- yarn run bundle
This will cause two webpack builds (one with allChunks:true and one without).
You'll notice the one with allChunks:true is about 2x the size of the other, and contains both the bundle-loaded routes css.
Here's the question... how do you avoid this?