Skip to content

Specify hostname for chunks from React.lazy during development #12455

@danielweil

Description

@danielweil

Hi, I have a problem with getting code splitting using React.lazy to work during development. The problem is that I'm loading in the generated bundle from a different localhost than the CRA is serving the files from. (localhost:9080 vs localhost:3000). However the chunks are loaded without a specified hostname which results in them being loaded from localhost:9080 instead of localhost:3000. I've tried setting HOST, PORT, and PUBLIC_URL in .env.development. All to no avail.

Is there a way to specify the hostname for the fetched chunks generated by using React.lazy? Thanks for any assistance!

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