workbox: webpack plugin does not respect `splitChunks`
Library Affected: workbox-webpack-plugin
Issue or Feature Request Description:
I have enabled webpack’s splitChunks
option. This splits my chunks so that “vendor” imports are stored in a separate asset. For example, the main
chunk will result in two assets: main.js
and vendors~main.js
.
When I use InjectManifest
’s chunks
option to whitelist the main
chunk, I expect it to include all the assets relating to this chunk. In this case, that would be main.js
and vendors~main.js
.
However, it does not seem to respect the vendor asset created by splitChunks
—it only includes main.js
.
It is not feasible for me to list these manually, because webpack may create any number of vendor assets, depending on the common module imports between all my chunks.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 32 (15 by maintainers)
Hey! Yup it fixes it. Test case here. Thank you. 😃
@jeffposnick Here is a minimal test case: https://github.com/OliverJAsh/workbox-webpack-split-chunks-example/tree/055c750a757ce1fc3e1a436f88f59e468a67e791