This repository was archived by the owner on Mar 27, 2019. It is now read-only.
This repository was archived by the owner on Mar 27, 2019. It is now read-only.
environments concept #581
Closed
Description
This idea comes from use-cases I've routinely encountered. The premise is that we expose environment variable COMPONENT_ENV
via e.g. require('env').
* and also let users hook onto its value in component.json
so that we can have branches of component.json
that are resolved only if in the respective env
, e.g.:
"env-prod": {
"dependencies": {
"reactjs/reactjs-min"
}
},
"env-dev": {
"dependencies": {
"reactjs/reactjs"
}
}
This is rough, but I think the premise is sound, again it solves real problems I've encountered. I often have env
-aware client projects etc. Am I an exception here or can we turn this into a positive for general use?
- This should be a plugin but that has been a PITA even when working with
builder.js
from scratch.