-
-
Notifications
You must be signed in to change notification settings - Fork 27k
npm start should reuse the currently open tab #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yeah, there's an issue on Chrome where they don't want to implement that feature, but I've read that you can use applescript in order to do that. @frantic is doing something similar for the react native chrome debugger opening. |
There’s also a Chrome extension that does it out of the box. |
(We can also add something like this to React DevTools, assuming the port is more specific so we’re not handling false positives. Most people developing on React already have React DevTools.) |
Here's the applescript that keeps the current tab: https://github.com/facebook/react-native/blob/f03c7b59fd8962682cff5797a3916882ef389871/packager/launchChromeDevTools.applescript They replaced it with opn but check on the devserver if the tab with the websocket is already opened. Unfortunately we can't do that here because we don't maintain a running server. |
It’s not very nice to force people to use Chrome. After all our friends at Mozilla are building new Firefox debugger with React 😄 . Maybe there is some way to check if Chrome is the default browser? |
Absolutely, my previous solution checked if Chrome was opened before running it and the current one uses the default browser |
👍 We could then combine your check with AppleScript and fallback to |
It is annoying to restart and have a new tab opened every time.
I’m not sure how to do it but we should try to refresh the existing tab instead of opening a new one.
The text was updated successfully, but these errors were encountered: