Daros911
Daros911

Reputation: 435

Set up default browser for npm serve of a react app?

How can i change the default browser fired up when running npm start for a create-react-app created app?

It'll run Firefox but I'd like the Chrome...

Upvotes: 0

Views: 6818

Answers (1)

lujobi
lujobi

Reputation: 54

I think these links might help:

  1. https://coderrocketfuel.com/article/open-create-react-app-in-a-specific-browser
  2. create-react-app: How do I "npm start" with a specific browser?

Both set the BROWSER environment variable before executing the start command. In your case you'll have to edit the start command package.json file according to this answer: https://stackoverflow.com/a/59882442/10250548

Upvotes: 1

Related Questions