Is your proposal related to a problem?
From the docs:
By default, Create React App will open the default system browser, favoring Chrome on macOS.
This doesn't really make sense; it either opens the default browser or it doesn't. For example, if:
- I have Firefox and Chrome open
- Firefox is my default browser
- I run
npm start
- CRA will open the app in Chrome
Describe the solution you'd like
I think what openChrome.applescript does is amazing for people who use Chrome. It's logical that this should be the default.
What I propose is allowing the user to bypass the openChrome.applescript with a environment variable similar to what y'all are doing with BROWSER=none. I already have working changes that I could submit as a PR. It:
- Allows users to specify
BROWSER=default in .env
- Sets
shouldTryOpenChromeWithAppleScript to false if BROWSER is default
- Returns
BROWSER to undefined so the rest of openBroswer.js can do its thing (opening in the default browser)
Describe alternatives you've considered
I thought about changing openChrome.applescript to make it do the same thing with Firefox as it does with Chrome, unfortunately FF doesn't have as good of support as Chrome for AppleScripts.
The only other thought I had was to modify shouldTryOpenChromeWithAppleScript to check what the OS default browser is, but I'm not sure if that's possible.
I figure my suggestion would be the least invasive, allowing people to opt-in to this behavior.
Additional context
Not really sure if there's anything else. Let me know if you'd like me to submit this as a PR.
Is your proposal related to a problem?
From the docs:
This doesn't really make sense; it either opens the default browser or it doesn't. For example, if:
npm startDescribe the solution you'd like
I think what
openChrome.applescriptdoes is amazing for people who use Chrome. It's logical that this should be the default.What I propose is allowing the user to bypass the
openChrome.applescriptwith a environment variable similar to what y'all are doing withBROWSER=none. I already have working changes that I could submit as a PR. It:BROWSER=defaultin.envshouldTryOpenChromeWithAppleScriptto false ifBROWSERisdefaultBROWSERtoundefinedso the rest ofopenBroswer.jscan do its thing (opening in the default browser)Describe alternatives you've considered
I thought about changing
openChrome.applescriptto make it do the same thing with Firefox as it does with Chrome, unfortunately FF doesn't have as good of support as Chrome for AppleScripts.The only other thought I had was to modify
shouldTryOpenChromeWithAppleScriptto check what the OS default browser is, but I'm not sure if that's possible.I figure my suggestion would be the least invasive, allowing people to opt-in to this behavior.
Additional context
Not really sure if there's anything else. Let me know if you'd like me to submit this as a PR.