Skip to content

Feature: Duplicate dependency detection across different chunks #3

Description

@pjlee11

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions