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

feat: support multiple env params #1715

Merged
merged 6 commits into from Aug 1, 2020
Merged

Conversation

anshumanv
Copy link
Member

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

Copy link
Member

@alexander-akait alexander-akait left a 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?

@anshumanv
Copy link
Member Author

in near future

@webpack-bot
Copy link

@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
Copy link
Member Author

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 })],
Copy link
Member Author

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 😞

@anshumanv anshumanv merged commit d315443 into webpack:next Aug 1, 2020
@anshumanv anshumanv deleted the multiple-env branch August 1, 2020 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants