-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Config validation - part two #615
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
Comments
Started working on this today, but I'm running into a couple of problems. webpack itself handles a part of the command line parsing from webpack-dev-server, because there is some overlap. E.g. webpack handles But, some options are specific to WDS, so they are parsed in WDS and not in webpack. E.g. the Other options are specific to webpack-dev-middleware, like the A while ago I made PR #2950 for webpack, which introduces some validation when you're using So my question is, where do we put all the validation logic? When starting WDS, it would be nice if there is a list of all errors. This is difficult when everything is spread out into different repo's though. |
I'm thinking the best course of action would be to decouple WDS from webpack entirely. I have a feeling their interaction leads some of those configuration issues. I understand you need to do Good problems to solve. |
See part one for what needs to get done before this is even relevant.
webpack has strict validation of the configuration now. It's time for webpack-dev-server, and webpack-dev-middlware to also get some validation on the configuration.
The validation should give warnings only in the beginning. In a later release, we can change this to be errors. The webpack-dev-* packages are used in so many different usecases, that it is very hard to not break things for users.
A couple of things that we should especially look at:
--inline
in combination with--lazy
or--hot
with--hot-only
).inline: true
in the node API; this only has effect if you're using the CLI.hot: true
in the node API without theHotModuleReplacementPlugin
.webpack-dev-server/client
.output.filename
or inentry
(see Webpack dev server respond 404 if set entry name or output.fileName with prefix ‘/’. #670).cc @bebraw
The text was updated successfully, but these errors were encountered: