with the introduction of webpack 4, splitChunks.name
is used to define the name of a split chunk. here, the documentation says the key can be mapped to a function for custom naming:
https://webpack.js.org/plugins/split-chunks-plugin/#splitchunksname
It takes in params module
, chunks
, cacheGroupKey
. the documentation for these params is kind of lacking, but I can use intuition for some. ie, cacheGroupKey
pertains to the keys defined in splitChunks.cacheGroups
. i think chunks
are the chunks that share common code that is a part of the cacheGroupKey
chunk but there's no official docs about that anywhere.
so, my question is does anyone have any insights on what those three parameters are referring to?