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

Overlay remains if warnings are present during HMR #1042

Closed
gcangussu opened this issue Aug 14, 2017 · 4 comments
Closed

Overlay remains if warnings are present during HMR #1042

gcangussu opened this issue Aug 14, 2017 · 4 comments

Comments

@gcangussu
Copy link

Do you want to request a feature or report a bug?
Report a bug.

What is the current behavior?
The error overlay doesn't disappear during the hot module replacement if there are warnings on the webpack compilation.

If the current behavior is a bug, please provide the steps to reproduce.
You need to configure HMR and to show overlays on errors only, then

  1. introduce a warning in your code (e.g. eslint's no-console with the eslint loader and Airbnb's preset). You should see the warning on the console but no overlay.
  2. Introduce an error in your code. You should see the error in your console and in the overlay that appeared.
  3. Remove the error from your code. The warning will appear on console, the error won't appear on console, but the overlay won't disappear.

My config is:

devServer: {
  contentBase: false,
  overlay: {
    warnings: false,
    errors: true,
  },
  publicPath: '/',
  https: true,
  hot: true,
  hotOnly: true,
},

What is the expected behavior?
I expect the error overlay to disappear, like it does when no warning is present.

Please mention your webpack and Operating System version.
webpack 3.5.4
webpack-dev-server 2.7.1
Running on Ubuntu 16.04

@gcangussu gcangussu changed the title Overlay remains if warnings are present on HMR Overlay remains if warnings are present during HMR Aug 14, 2017
@shellscape
Copy link
Contributor

I think we're going to need a link to a simple app in a repo that we can use to reproduce this bug. In prelim tests I wasn't able to reproduce, so it could be something in your codebase specifically. If you can get a simple app going that reproduces this (so we're not chasing a goose of an issue caused by something custom), we can look into it further.

@gcangussu
Copy link
Author

Sure @shellscape, should've done this from the beginning. Here it is https://github.com/gcangussu/webpack-overlay-bug/tree/master

See readme for detailed instructions of how I did to reproduce the error.

@shellscape
Copy link
Contributor

@gcangussu this is an outstanding sample app and readme. thank you for putting that together, we'll have a look.

@shellscape
Copy link
Contributor

@gcangussu confirmed that we have an issue here, I was able to reproduce the error using your example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants