webpack-cli icon indicating copy to clipboard operation
webpack-cli copied to clipboard

how to add webpack-dev-server cors header via cli?

Open ederzz opened this issue 3 years ago • 4 comments

As title, help!

ederzz avatar Mar 25 '22 03:03 ederzz

Impossible, but we can add them @webpack/cli-team sounds like a easy improvement, let's add flag to webpack-dev-server, so webpack-cli will support it

alexander-akait avatar Mar 25 '22 11:03 alexander-akait

Impossible, but we can add them @webpack/cli-team sounds like a easy improvement, let's add flag to webpack-dev-server, so webpack-cli will support it

Ok,a little sad...

ederzz avatar Mar 26 '22 11:03 ederzz

Yep. We can add it to webpack-dev-server. We may need custom type like --env or you want to pass json from CLI directly?

snitin315 avatar Mar 26 '22 11:03 snitin315

Yep. We can add it to webpack-dev-server. We may need custom type like --env or you want to pass json from CLI directly?

I just thought the config in json could be set in cli options, and then found it not work.

ederzz avatar Mar 28 '22 02:03 ederzz

Closing due to inactivity. We have the --env variables, so you can setup it inside configuration, CORS can be different so it is hard to implement all possible cases, so better to do it in configuration

alexander-akait avatar Sep 07 '22 19:09 alexander-akait