npm start
starts the react server on the default browser, which is Firefox for me. I like Firefox for browsing but prefer Chrome in web deve
As you have mentioned that you are using create-react-app
for creating react app and you want chrome to open on hitting npm start
. Set BROWSER
variable in package.json
present in your project in the following manner:
Replace:
"start": "react-scripts start"
With:
"start": "BROWSER='google-chrome-stable' react-scripts start"
"start": "BROWSER='chrome' react-scripts start"
"start": "BROWSER='google chrome' react-scripts start"