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 cool-dependency@2.6.0 and cool-dependency@3.1.0 which we would want to know be reported on the PR.
Currently
webpack-bundle-deltadetects 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
Any page that uses
bundle-awill have havecool-dependency@2.6.0andcool-dependency@3.1.0which we would want to know be reported on the PR.