-
Notifications
You must be signed in to change notification settings - Fork 296
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
Suppress / filter console warning messages #319
Labels
Comments
Yep, this is an oversight - i can't see any reason not to add a A PR would likely be accepted. |
If you want to solve this via a simple |
jgraniero
pushed a commit
to jgraniero/webpack-hot-middleware
that referenced
this issue
Jul 10, 2018
Add noWarn client parameter. resolves webpack-contrib#319
6 tasks
jgraniero
added a commit
to jgraniero/webpack-hot-middleware
that referenced
this issue
Jul 10, 2018
Add noWarn client parameter. resolves webpack-contrib#319
jgraniero
added a commit
to jgraniero/webpack-hot-middleware
that referenced
this issue
Jul 10, 2018
add noWarn client parameter resolves webpack-contrib#319
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Proposal
Configure HMR client warning logs.
Feature Use Case
I use Typescript with ts-loader. The ts-loader docs indicate that the
transpileOnly
option should be set totrue
for HMR (also recommended to decrease build speed). If you have code that re-exports atype
, e.g.the
transpileOnly
flag will generate export code that webpack sees as invalid and webpack will report these issues as warnings. There was a discussion about this over in the ts-loader repo.It seems the accepted solution to suppress these warnings is to add a
warningsFilter
to webpack'sstats
- which works fine, but thewebpack-hot-middleware
client still sees and reports these warnings to the browser console. This can make rebuilds really noisy.Correct me if I'm wrong, but the only option to suppress these warnings right now would be to turn off all HMR client logging - which I don't really want to do because some of it is useful, like seeing what gets rebuilt and reloaded.
Ideally I'd like to be able to filter warning message the same way I'm doing with webpack's
stats.warningsFilter
, but I could see it being problematic adding something like that to the HMR client's query params. I'd be fine with just suppressing logging warning messages to the browser console, much like you can suppress info messages withnoInfo
.The text was updated successfully, but these errors were encountered: