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
feat: support multiple env params #1715
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add tests?
in near future |
@anshumanv Thanks for your update. I labeled the Pull Request so reviewers will review it again. @evilebottnawi Please review the new changes. |
@@ -1 +1,3 @@ | |||
console.log('chuntaro'); | |||
// eslint-disable-next-line no-undef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need disable because envMessage is not present in scope but instead coming from env
@@ -10,6 +13,8 @@ module.exports = (env) => { | |||
return { | |||
entry: './a.js', | |||
mode: 'development', | |||
stats: env.verboseStats ? 'verbose' : 'normal', | |||
plugins: [new DefinePlugin({ envMessage: env.envMessage ? JSON.stringify('env message present') : false })], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need JSON.stringify, can't pass string directly 😞
What kind of change does this PR introduce?
feat
Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
Yes
Summary
Having multiple env is a common use case so a single arg won't suffice, hence added support for multiple
Does this PR introduce a breaking change?
No
Other information