-
Notifications
You must be signed in to change notification settings - Fork 928
Open
Labels
Description
Describe the Feature
On MacOS with iTerm, on the previous version of the CLI, Metro opened in a new tab instead of a new window.
I don't know if I'm alone in this situation, but I found it extremely painful to have so many windows open.
Possible Implementations
After investigation, this is due to a little change in @react-native-community/cli-tools/build/startServerInNewWindow.js:103
:
// Old version
return _execa().default.sync('open', ['-a', terminal, launchPackagerScript], procConfig);
// New version
return _execa().default.sync('open', ['-na', terminal, launchPackagerScript], procConfig);
The last version have -na
option instead of -a
when running launchPackager.command
that force the new window.
If other people are facing the same problem, we may consider putting an environment variable to override these flags, like REACT_LAUNCHPACKAGER_OPTIONS="-a"
.
For the moment I use patch-package
to fix it on my repo.
What do you think about this proposal ?