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?
great on it
Yes, we have it for v5, nice to have it for v4 too.
I think we should implement this before https://github.com/webpack/webpack-cli/issues/1657
yeah makes sense to add this first
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?
I'm not sure but I think the only difference between this and #1657 should be the support of multiple values?
@anshumanv webpack --name=web should only set options.name = 'web'. i.e, simply about passing the name to compiler.
yeah seems straightforward, will PR today
Completed.
Most helpful comment
Yes, we have it for v5, nice to have it for v4 too.