Webpack-hot-middleware: No overlay for warnings

Created on 10 Dec 2017  路  10Comments  路  Source: webpack-contrib/webpack-hot-middleware

I'm trying to get the client overlay to display when there are JS warnings, similar to how I'd do so with the Webpack DevServer by setting the overlay option object like so:

overlay: {
  warnings: true,
  errors: true
}

It looks like if I remove the conditional check in client.js, I can get them to display, e.g.:

      if (overlay) overlay.showProblems(type, obj[type]);

Am I missing a configuration somewhere, or is this intentional? Otherwise, perhaps a warnings config could be added to the client options, defaulting to false?

accepted help-wanted

Most helpful comment

@glenjamin I can see that. Was just following the options available with the DevServer. I can do a single param overlayWarnings instead.

All 10 comments

Warnings did used to be on, but someone complained way back and they got disabled.

Bringing them back behind a config value seems sensible to me, a PR would be welcome

I'll see what I can do. Since these configs need to be passed as query params, how about two configs, so one could do:

'webpack-hot-middleware/client?path=/__what&overlayErrors=false&overlayWarnings=true'

Which would flip default options of overlayErrors: true and overlayWarnings: false.

I'm not sure there's any reason why errors should be disabled?

@glenjamin I can see that. Was just following the options available with the DevServer. I can do a single param overlayWarnings instead.

most wanted feature 馃槃 !

There鈥檚 an open PR for this

https://github.com/glenjamin/webpack-hot-middleware/pull/275

Its mostly there, just needs some tweaks to tidy it up.

If anyone would like to take it over, please do.

Hi @glenjamin !

I'll like to know if overlayWarnings feature is now part of webpack-hot-middleware latest release because it's no working for me.

Oh whoops, looks like I forgot to do a release.

Will aim to cut one within the next few days

Haha ok nice !

This was released today as 2.22.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Yizhachok picture Yizhachok  路  6Comments

leiming picture leiming  路  13Comments

erikakers picture erikakers  路  11Comments

peteruithoven picture peteruithoven  路  7Comments

drewwyatt picture drewwyatt  路  8Comments