-
-
Notifications
You must be signed in to change notification settings - Fork 246
Webpack Dev Server not reporting errors on subsequent recompile #476
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
Closing as duplicate of #36 Please note there's a workaround in that thread that may be worth trying. Fascinating to hear that this wasn't an issue with v4 but is with v5! I was actually under the impression that with v4 it was an issue too. cc @piotr-oles |
@johnnyreilly I'm not sure this is a duplicate of that issue. My issue is not limited to type-only files, this happens in our React components. Also, compilation is running on subsequent file saves, it's just reporting a false negative (saying successful when an error still exists). |
Noticeable, when I set |
cc @piotr-oles - perhaps not a duplicate |
Does this error occur for |
yes, |
@piotr-oles I found the problem! We had our webpack config wrapped in |
In the event anyone else needs it, this is the config we use in development that is working correctly with webpack-dev-server. This also solved our issue with
|
Thanks! That's very interesting - I will try to investigate why there was such a conflict :) |
This issue has come up during our upgrade to v5. It wasn't an issue in v4. We use babel's preset for typescript via the babel-loader for webpack.
Consider a basic type error
const x: number = "word"; //Type '"word"' is not assignable to type 'number'.ts(2322)
On initial compile with the webpack dev server, this correctly throws an error.
However, on a subsequent file save (with the same error still present), the dev server reports a successful compile despite the error still existing.
webpack.config.js
tsconfig.local.json
Environment
The text was updated successfully, but these errors were encountered: