Skip to content

Feature request: Launch browser into a unique origin #6357

@donavon

Description

@donavon

Problem

npm start launches http://localhost:3000. If I've ever worked on a different app, its localStorage is now polluting my new app as they share an origin.

Solution

If HOST === 'localhost' then call opn with target set to http://{folder-name}.localhost:{port}

This way every app has a unique origin and this its own localStorage. I know that I can do this manually, but having CRA do it for me would be nice.

Thoughts?

This is related to #2578, but writing a script to get this to work seems like a lot of duplicated effort for each project

I also can't just set HOST as it won't bind to {folder-name}.localhost

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions