webpack-bundle-delta
webpack-bundle-delta copied to clipboard
Feature: Duplicate dependency detection across different chunks
Currently webpack-bundle-delta
detects duplicate dependencies when they are in the same chunk which is awesome, however it would be good to push this one step further with duplicate dependency detection across all chunks. This should be an opt-in feature behind a flag as by default not all applications would need it.
The idea behind this is that some complex applications will have chunks brought in by other chunks (EG: dynamic imports) which could end up with duplicate dependencies. Take the following example:
Example
// bundle-a.js
require.ensure('bundle-c.js');
deps: [
'cool-dependency': ^2.6.0,
]
// bundle-b.js
require.ensure('bundle-c.js');
deps: [
'cool-dependency': ^3.0.2,
]
// bundle-c.js
deps: [
'cool-dependency': ^3.1.0,
]
Any page that uses bundle-a
will have have [email protected]
and [email protected]
which we would want to know be reported on the PR.