score:3

as i read on the script that runs when you run npm start, you may set an environment variable called browser before running the npm start

for example (on linux):

(export browser=firefox;  npm start)

also, you may open the browsers after starting:

npm start &
firefox http://localhost:3000
safari http://localhost:3000

save it to a something.sh and run this shell script. if you are on windows, you may do something similar on .bat script

score:3

you can install global node package called opn-cli then you can run the command. https://www.npmjs.com/package/opn-cli

sample command:

npm start & opn http://localhost:4200 -- firefox & opn http://localhost:4200 -- chrome

score:9

create an environment file .env at the root of the project directory and add following entry

browser=firefox

for a complete list of .env file configuration, you can check here - https://facebook.github.io/create-react-app/docs/advanced-configuration


Related Query

More Query from same tag