[go: up one dir, main page]

Skip to content
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

inline-environment-variables should take an object to supplement process.env #360

Open
mbrevda opened this issue Dec 27, 2016 · 0 comments
Labels
bug Confirmed bug

Comments

@mbrevda
Copy link
mbrevda commented Dec 27, 2016

When using process.env replacement and building for multiple environments with different configurations simultaneously, these vars will overwrite each other and only the latest will take effect, affect all current builds.

To illustrate with a use case: building the same project for multiple partners with process.env based branding tweaks. When running a "partners build" the env vars are set like Object.keys(env).forEach(key => process.env[key] = env[key]) and the last set values will affect all builds. This should be obvious, but it took us a while to realize what was happening.

Similar tools, such as envify allow for an object to be used for replacement values, in addition to process.env. Perhaps inline-environment-variables can take the same approach: allow for an object that would override process.env if it contained a matching key?

@kangax kangax added the bug Confirmed bug label Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants