I need to load for each development/production server a different .env file.
Dev/Prod Server | .env file
---------------------------------------------
localhost | .env.development.local
development | .env.development
qa | .env.qa
production | .env.production
So, I tried to edit the package.json in this way
"start-js": "react-scripts start .env.development.local",
"start": " npm-run-all -p watch-css start-js",
"build:dev": "npm run build-css && react-scripts build .env.development",
"build:qa": "npm run build-css && react-scripts build .env.qa",
"build:pro": "npm run build-css && react-scripts build .env.production"
but if I execute a build:* command, the file loaded is always .env.production because the NODE_ENV is production. Is it possibile to load the others .env file with "build:* command?
build:qawith dotenv?npm run build-css && react-scripts dotenv_config_path=qa.envdon't recognizedotenv_config_path