You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's this flag reuseExistingChunk of SplitChunksPlugin which, when true, moves a chunk up to the parent cache group to avoid outputting duplicated code, and doesn't generate any file for the source chunk itself. This conflicts with the behaviour of flushChunkNames() since it won't look for chunk dependencies inside stats.namedChunkGroups if it's not inside stats.chunks in the first place, but it should. More people might face this same issue because it's the default behaviour of splitChunks.cacheGroups.defaults.
To be honest, I'm not 100% sure if it's because of reuseExistingChunk. Maybe this is just the expected normal behaviour.
Scenarios:
User has defined a cache group but it only encompasses one module, meaning the group chunk will be generated but not a chunk for the source module
User has defined a cache group but, because of restrictions provided by minChunks, minSize, maxSize or any other config parameter, Webpack ends up moving a module to the parent chunk
There's this flag
reuseExistingChunk
of SplitChunksPlugin which, whentrue
, moves a chunk up to the parent cache group to avoid outputting duplicated code, and doesn't generate any file for the source chunk itself. This conflicts with the behaviour offlushChunkNames()
since it won't look for chunk dependencies insidestats.namedChunkGroups
if it's not insidestats.chunks
in the first place, but it should. More people might face this same issue because it's the default behaviour ofsplitChunks.cacheGroups.defaults
.To be honest, I'm not 100% sure if it's because of
reuseExistingChunk
. Maybe this is just the expected normal behaviour.Scenarios:
Related code fragment:
webpack-flush-chunks/src/flushChunks.js
Lines 233 to 238 in b3534a3
The text was updated successfully, but these errors were encountered: