You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: babel-preset-react-app forces to use only specific NODE_ENV or BABEL_ENV i.e 'development' / 'production' / 'test' #2592
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.
This is intentional because this is how we decide which plugins to apply. However a cleaner way to do so would be by adding options to the preset, and reading target environment from options.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Activity
gaearon commentedon Jun 22, 2017
This is intentional because this is how we decide which plugins to apply. However a cleaner way to do so would be by adding options to the preset, and reading target environment from options.
Would you like to send a PR for that?
stale commentedon Dec 8, 2018
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
stale commentedon Dec 13, 2018
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.