-
-
Notifications
You must be signed in to change notification settings - Fork 627
v4-beta : use env variable with config as a function #1689
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
In starting we dropped the support of |
I think we support it like |
Hey @xylolink 👋 The env flag presently only supports string in the format |
Maybe the problem is that I retrieve webpack-cli-monorepo from github ? |
Yes, seems so. Can you try to update your package.json like this and try reinstalling?
|
@xylolink added support for multiple env in #1715 But the syntax is slightly different because we're using a different parser now,
/cc @evilebottnawi |
@anshumanv with commander 6 now we can support Should I create a PR for the same? |
+1 from my side on this. |
yep that will be good, go ahead 👍 |
@anshumanv |
It can cause trouble in this case but might be handy for cases when we have long flag name like, |
For complex cases you should use |
Agreed. |
Should we close this? |
I think yes, we fix it |
Closing, feel free to open a new issue for any feedback/problems. 😄 |
Describe the bug
We need to manipulate env vars in the config file to adjust the compilation entries points
What is the current behavior?
Cli does not recognize --env.MYVAR parameter
Config returning this kind of result is not considered by CLI without any error message :
module.exports = (env) => { return { // my conf }
To Reproduce
encapsulate your config object in a function and try to compile it.
Expected behavior
CLI should receive config functions and --env parameters
Screenshots
Compilation results without function

Compilation result with function

Unknown --env params

The text was updated successfully, but these errors were encountered: