Skip to content

[v4] Duplication between split chunks #6413

Closed

Description

@joshjg

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
A bunch of async child chunks in my application require a common dependency (which lives within my repo). The common dependency also has its own 3rd party dependencies (in node_modules). Webpack creates two output chunks which both include the 3rd party dependencies:

  • childA~childB~childC
  • vendors~childA~childB~childC

If the current behavior is a bug, please provide the steps to reproduce.

  • Use default chunk-splitting behavior
  • Have several async child chunks
  • Have a large common 1st party (non-node_modules) dependency between those chunks
  • 1st party common dependency has large 3rd party dependencies

What is the expected behavior?
The 3rd party code should only be present in one chunk, not both.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
Webpack: v4.0.0-beta.0
Node: 8.x

Activity

  1. sokra commented on Jan 30, 2018

    @sokra
    Member

    Thanks for your report. It would be great if you reduce your issue to a small reproducible example. Best put this example into a github repository together with instructions how to get to the problem.

  2. added a commit that references this issue on Feb 1, 2018
    f21b1ee
  3. TheLarkInn commented on Feb 4, 2018

    @TheLarkInn
    Member

    @joshjg can you confirm that #6432 fixes your issue? (If you are willing to pull down PR and test locally).

    Just want to confirm and track.

  4. joshjg commented on Feb 4, 2018

    @joshjg
    Author

    @TheLarkInn @sokra Confirmed the fix, thanks!

  5. TheLarkInn commented on Feb 5, 2018

    @TheLarkInn
    Member

    Appreciate you taking the time to test this.

  6. added a commit that references this issue on Feb 5, 2018
    4dd521f
  7. added this to the webpack 4 milestone on Feb 6, 2018
  8. added a commit that references this issue on Feb 6, 2018
    3139448
  9. billyvg commented on Feb 11, 2018

    @billyvg

    Is it possible this is also present in 3.x?

  10. sokra commented on Feb 12, 2018

    @sokra
    Member

    @billyvg no, splitChunks was added in v4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions