html-webpack-plugin: Use with `AgresssiveSplittingPlugin()` breaks because (?) `chunk.name = null;`
So I’ve been experimenting with a test branch on a starter repository using AgressiveSplittingPlugin(). You can see an example of AgressiveSplittingPlugin being used here in the webpack examples section.
I believe, looking at the code, that this fails because chunk.name is set to null (which basically renders your filterChunks() and other chunk/asset processing functions in the plugin useless).
https://github.com/webpack/webpack/blob/master/lib/optimize/AggressiveSplittingPlugin.js#L72
@sokra I was thinking: could we maybe change the chunk.name to [name]-split-[newChunk.newId]?
Otherwise, @jantimon is there a way to refactor that searching code, I played around a little bit, but wasn’t able to determine a reliable way to fetch all assets that we’re pulled out.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 13
- Comments: 21 (5 by maintainers)
any news on this? we need this for amp/universal/http2 apps
PR created - #670
You can use the entrypoints property on the compilation. There is also a getFiles prop you can use to find assets for that ep. Entrypoint class will only contain references to initial chunk and entry chunks. So async chucks will not appear
Any news on this issue? I want to use the AgressiveSplittingPlugin