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: add config-name flag #1722

Closed
anshumanv opened this issue Aug 1, 2020 · 10 comments
Closed

feat: add config-name flag #1722

anshumanv opened this issue Aug 1, 2020 · 10 comments

Comments

@anshumanv
Copy link
Member

Is your feature request related to a problem? Please describe.

Allow passing the config name from the CLI to determine which config to use when there are multiple - https://webpack.js.org/configuration/other-options/#name
It's in v3 but seems to be removed from here for some reason

Describe the solution you'd like
Just need to create a flag and add tests

Describe alternatives you've considered
flag seems the most appropriate

Additional context
@webpack/cli-team do you have any other ideas about this?

@alexander-akait
Copy link
Member

I think we already have it for webpack@5, but I think it will be great to webpack@4 too

/cc @snitin315

@anshumanv
Copy link
Member Author

great on it

@snitin315
Copy link
Member

Yes, we have it for v5, nice to have it for v4 too.

@snitin315
Copy link
Member

I think we should implement this before #1657

@anshumanv
Copy link
Member Author

yeah makes sense to add this first

@anshumanv
Copy link
Member Author

will check it out, this should simply be about passing the the name to compiler or filter the config as per name in the CLI and then pass that config?

@snitin315
Copy link
Member

I'm not sure but I think the only difference between this and #1657 should be the support of multiple values?

@snitin315
Copy link
Member

snitin315 commented Aug 18, 2020

@anshumanv webpack --name=web should only set options.name = 'web'. i.e, simply about passing the name to compiler.

@anshumanv
Copy link
Member Author

yeah seems straightforward, will PR today

@anshumanv
Copy link
Member Author

Completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants