-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NODE_ENV should be used strictly #1565
Comments
At the same time, please change the following:
This makes it possible to use NODE_ENV later on, i.e. to give context to the client, which is static, but needs to know sometimes what env it's running in, for example to point to statics in S3 |
Do not over-use NODE_ENV for app-related stuff. Get your own APP_ENV
variable, and get NODE_ENV to have a value based on the value of that
variable.
|
We are using As for why we use I hope this helps! |
But I would like an argument, not just status quo reasoning. My suggestion doesn't break anything, but allows for the other use case as well... So no breaking anything, otherwise I wouldn't suggest it...so please consider your resistance and reason about it afresh |
My argument is that Redux is overwhelmingly used in React projects, and introducing a different convention is going to cause people who don’t specify |
If you insist on specifying something other than |
I understand....too bad we are throwing away what was given to us long ago, just because some dumbasses didn't realize that a lot of tooling DOES use the NODE_ENV for dev/test/acc/prod...typically front end people who don't look beyond their scope. Node.js was there looooooong before it was used for frontend tooling...shame |
We don’t tolerate personal attacks and derogatory language in this repository. |
I would suggest using explicit tests to see if development features are needed, also to accomodate other dev/test/acc/prod usage in other packages, like in loopback, so:
if (process.env.NODE_ENV !== 'production')
would become
if (process.env.NODE_ENV === 'development')
The text was updated successfully, but these errors were encountered: