Error: `babel-preset-react-app` forces to use only specific `NODE_ENV` or `BABEL_ENV` i.e 'development' / 'production' / 'test'
Created by: rahulbansal89
Can you reproduce the problem with latest npm?
Yes
Can you still reproduce it?
Yes
Description
babel-preset-react-app forces to use only specific NODE_ENV or BABEL_ENV i.e development / production / test.
And when i am trying to use any another environment then it is showing the below error:
Module build failed: Error: Using babel-preset-react-app requires that you specify NODE_ENV or BABEL_ENV environment variables. Valid values are "development", "test", and "production". Instead, received: "staging"
But what to do if we need to use it with some another environment like for UAT environment etc. ?
Expected behavior
It should support any environment or environment other than specific should be treat like production.