Add flag to react-scripts to suppress auto-opening `localhost:3000`
See original GitHub issueAuto-opening the browser tab can get really annoying in certain situations.
-
Sometimes I already have the window open and would prefer to just reload the tab.
-
Other times I’m testing another browser and don’t want to keep opening my default browser.
-
Sometimes I need to open a custom URL. In my latest project, I need to add a query string to use the staging server instead of the production server. With the suppression flag, I could change my start script to:
react-scripts start --no-open-browser; open localhost:3000?useapi=production
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How stop after running react-scripts start? - Stack Overflow
Hit your keyboard shortcut for stopping terminal commands (usually Ctrl+C or Ctrl+Q). Or, if you don't have input access to the process, ...
Read more >Everything you need to know about react-scripts
ceate-react-app comes with useful scripts that eliminate the slog of configuration, making it easier than ever to build React apps.
Read more >Advanced Configuration - Create React App
Variable Development Production
BROWSER ✓ Used 🚫 Ignored
BROWSER_ARGS ✓ Used 🚫 Ignored
HOST ✓ Used 🚫 Ignored
Read more >How To Set Up a React Project with Create React App
http://localhost:3000 Note that the development build is not optimized. To create a production build, use npm run build. If you are running the ......
Read more >How to get create-react-app to work with a Node.js back-end API
Create a /client directory under example-create-react-app-express ... Open ./package.json and add the following to the scripts entry
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can run
BROWSER=none npm start
or create an.env
file withBROWSER=none
in it to prevent the browser from opening.Let us know if you need help with anything else!
Yeah, our tab reloading only works for Chrome (sorry!). If you’re familiar with AppleScript, you can try to contribute Firefox support!