Is there any way to create React App build from a command like? So far I have in the shell script:
npm install;
npm run-script build:test;
where build:test
is
bash -ac '. .env.test; react-scripts build'
but that will refer to build:test
script from package.json
but when I want to use specific .env
file in the shell script (without editing or adding anything to package.json
) as follow
npm run .env.my_box react-scripts build;
that will not execute build for .env.my_box
What I have set incorrectly?