Skip to content

Unclear default code splitting in cra v2 #5754

Closed
@slava-lu

Description

@slava-lu

Is this a bug report?

If very unclear documentation is a bug then yes.

A newly created and built app with Create react app v2 creates three js chucks by default. But there is not a single line in neither index.js nor in App.js that does code splitting according to this guide
https://reactjs.org/docs/code-splitting.html

I could not find any info, not in release notes, nor anywhere else why there are three bundles now without any dynamic import statements, what is the point and benefits of having three bundles even for 120K app, and what to do if I want only one js but want to keep other features of cra v2.

There is a ticket to disable a code splitting (#5306) but could you please elaborate a bit why it there in the default app in the first place if neither line of code asks for that.

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