Skip to content

Code splitting and preventing duplication #3728

Closed
@winkerVSbecks

Description

@winkerVSbecks

Is this a bug report?

Not a bug but, looking for some clarification

Which terms did you search for in User Guide?

Code Splitting, CommonsChunkPlugin, bundle-buddy


The user guide has a section on code splitting that focuses on dynamic import. However, I don't see any info on preventing duplication.

The webpack code splitting guide and bundle-buddy recommend using CommonsChunkPlugin to prevent code duplication across multiple chunks. However, it seems that CRA is not using CommonsChunkPlugin. Is the duplication being prevented via some other mechanism? If not, would you be open to a PR that adds CommonsChunkPlugin to webpack.config.prod.js.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions