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: allow passing strings in env flag #1939

Merged
merged 4 commits into from Oct 16, 2020

Conversation

anshumanv
Copy link
Member

What kind of change does this PR introduce?
feat/fix

Did you add tests for your changes?
Yes

If relevant, did you update the documentation?
Need to reflect in docs

Summary

  • Allow passing strings to env flag which is passed to config
  • You can now do -

webpack --env platform=app --env production

which will pass { platform: "app", production: true } to the config

Does this PR introduce a breaking change?

Nope

Other information

Fixes #1932

@paulmackinlay
Copy link

It would be good to update the new --env approach at https://webpack.js.org/api/cli/ and also explain how to migrate to version 5 at https://webpack.js.org/migrate/5/

@anshumanv
Copy link
Member Author

Yep, @paulmackinlay I have a PR already - webpack/webpack.js.org#4051 hoping it's merged soon.

@alexander-akait
Copy link
Member

/cc @anshumanv please focus on it

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?

marques-work added a commit to gocd/gocd that referenced this pull request Oct 15, 2020
@ntucker
Copy link

ntucker commented Oct 16, 2020

Release new version? :D

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.

Enhance env flag support
6 participants