Why does environment defaults to development and not production?
See original GitHub issueThis is my browserslist config:
"browserslist": {
"production": [
"last 2 versions",
"ie 11"
],
"development": [
"last 1 Chrome version"
]
}
My use-case is that I have a staging
NODE_ENV which compiles my app as it was production, but doesn’t uglify the code and uses sourcemaps. And of course I wanted to use the production browserlist.
Instinctively, I thought that if my NODE_ENV didn’t match any of the two options, it would default to production, but instead it defaults to development.
https://github.com/ai/browserslist/blob/64e9c07b6186d5eb4cfdeb8b5e3dc9c2bc6c8b43/node.js#L61
What did bring you to that decision? I think it can be reconsidered since the development environment is always one and only, instead you can have multiple production environments, say test
or whatever else, where you would need to use the production browserslist, since it isn’t viewed only by your development browser.
What do you think?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
I will release 3.0 when Jest release my Node.js fix
Released in 3.0.