A reactive native packer is executed every time I build my project (and there is no running package). I know that this is somewhat of a supposed behavior because the script responsible for running the package is part of the build phase of the React project.
The fact is that we do not always develop a component that responds to a reaction. In most cases, we work great with standalone packages built into the application. Therefore, we prefer that the native collector does not run on every assembly.
This is a script that is part of the build phase of the React project:
if [ -z "${RCT_NO_LAUNCH_PACKAGER+xxx}" ] ; then if nc -w 5 -z localhost 8081 ; then if ! curl -s "http://localhost:8081/status" | grep -q "packager-status:running" ; then echo "Port 8081 already in use, packager is either not running or not running correctly" exit 2 fi else open "$SRCROOT/../packager/launchPackager.command" || echo "Can't start packager automatically" fi fi
What I have tried so far:
Create a custom setting RCT_NO_LAUNCH_PACKAGER with a value of 1 in the "Build Settings" section of our project. This does not work and seems to have an effect when added to the React project itself. Not very useful, as this configuration will be cleared if someone reinstalls their node_modules.
Add the environment variable RCT_NO_LAUNCH_PACKAGER with a value of 1 to the arguments of the start phase of the assembly scheme in our project.
In addition, the RCT_NO_LAUNCH_PACKAGER system global variable is not something to keep in mind, as this will automatically affect all projects.
Any ideas?
matty source share