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

HMR does not work if ESLint returned a warning or error #4029

Closed
mmmDanone opened this issue Nov 16, 2021 · 7 comments · Fixed by #4056
Closed

HMR does not work if ESLint returned a warning or error #4029

mmmDanone opened this issue Nov 16, 2021 · 7 comments · Fixed by #4056

Comments

@mmmDanone
Copy link

Bug report

Actual Behavior

If ESLint detects a warning in the code (for example, console.log (123);), then HMR stops working, and something is updated until console.log (123); is removed. This is very strange behavior.

Expected Behavior

It is expected that HMR will not abort its work, and will ignore such warnings, because the compilation has, in fact, been successfully completed.

How Do We Reproduce?

https://github.com/mmmDanone/react-typescript-template

Please paste the results of npx webpack-cli info here, and mention other relevant information

System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz
Memory: 2.40 GB / 15.86 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
npm: 8.1.3 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.53)
Internet Explorer: 11.0.19041.1202
Packages:
babel-loader: ^8.2.3 => 8.2.3
css-loader: ^6.4.0 => 6.5.1
css-minimizer-webpack-plugin: ^3.1.1 => 3.1.3
eslint-import-resolver-webpack: ^0.13.2 => 0.13.2
eslint-webpack-plugin: ^3.1.0 => 3.1.1
file-loader: ^6.2.0 => 6.2.0
html-webpack-plugin: ^5.4.0 => 5.5.0
less-loader: ^10.2.0 => 10.2.0
postcss-loader: ^6.2.0 => 6.2.0
sass-loader: ^12.2.0 => 12.3.0
style-loader: ^3.3.1 => 3.3.1
terser-webpack-plugin: ^5.2.4 => 5.2.5
ts-loader: ^9.2.6 => 9.2.6
webpack: ^5.59.1 => 5.64.1
webpack-cli: ^4.9.1 => 4.9.1
webpack-dev-server: ^4.3.1 => 4.5.0

@obsius
Copy link

obsius commented Nov 16, 2021

Probably related to #4006.

@mmmDanone
Copy link
Author

Probably related to #4006.

this is not an endless reload

@obsius
Copy link

obsius commented Nov 16, 2021

@mmmDanone No, but the change made in that PR may be behind this issue.

@alexander-akait
Copy link
Member

Yep, found bug

@ghost
Copy link

ghost commented Nov 23, 2021

I stumbled upon the same issue.
As soon as eslint-webpack-plugin has any warning (even with failOnWarning: false), dev server do rebuilds but do not refresh the page.

@alexander-akait
Copy link
Member

It is on my roadmap to fix

@tuwrraphael
Copy link

For me its the workbox InjectManifest warning

WARNING in InjectManifest has been called multiple times, perhaps due to running webpack in --watch mode.

which stops auto-reload

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

Successfully merging a pull request may close this issue.

4 participants