React Universally will use the .env file even if there is for example an .env.test file available
config/utils/envVars.js
const envFileResolutionOrder = removeNil([
// Is there an environment config file at the app root?
// This always takes preference.
// e.g. /projects/react-universally/.env
path.resolve(appRootDir.get(), envFile),
// Is there an environment config file at the app root for our target
// environment name?
// e.g. /projects/react-universally/.env.staging
ifElse(DEPLOYMENT)(path.resolve(appRootDir.get(), `${envFile}.${DEPLOYMENT}`)),
]);
should be
const envFileResolutionOrder = removeNil([
// Is there an environment config file at the app root for our target
// environment name?
// e.g. /projects/react-universally/.env.staging
ifElse(DEPLOYMENT)(path.resolve(appRootDir.get(), `${envFile}.${DEPLOYMENT}`)),
// Is there an environment config file at the app root?
// This always takes preference.
// e.g. /projects/react-universally/.env
path.resolve(appRootDir.get(), envFile),
]);
React Universally will use the .env file even if there is for example an .env.test file available
config/utils/envVars.js
should be