Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Support passing env variables to Webpack #203

Closed
rowandh opened this issue Jun 28, 2017 · 2 comments
Closed

Support passing env variables to Webpack #203

rowandh opened this issue Jun 28, 2017 · 2 comments

Comments

@rowandh
Copy link
Contributor

rowandh commented Jun 28, 2017

I have a scenario where I need to make 3 different builds with different configs:

  • Developer build, use developer endpoint
  • QA build, use QA endpoint and --release flags
  • Prod build, use prod endpoint and --release flags

This is not going to be possible with the way ns-bundle is currently set up.

One solution would be to allow a different webpack.*.js path to be passed in to ns-bundle.

Another solution is for ns-bundle to parse --env.abc flags and pass them directly to webpack.config.js. In webpack.config it's then possible to do different things based on what env flags are set.

I'm not a heavy webpack user, so I'm not sure what the ideal solution is here.

@rowandh
Copy link
Contributor Author

rowandh commented Jun 28, 2017

I created a PR at #204 to illustrate what I'm talking about. I've been using a variation of this ns-bundle locally to create different builds.

@sis0k0
Copy link
Contributor

sis0k0 commented Jun 29, 2017

Merged with 4921321 . Will be release in the next patch version :)

@sis0k0 sis0k0 closed this as completed Jun 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants