-
Notifications
You must be signed in to change notification settings - Fork 823
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
Use webpack's performance.hints for reporting non-fatal errors #1380
Comments
Might be also worth noting in the migration guide, since this seems like a breaking change to me. |
It is a breaking change, yup. The migration guide currently reads:
We've iterated on that language a bit, and I hope the current wording steers developers in the right direction. |
Well maybe put the actual options in whose behavior changed. I usually Ctrl+F against the options I'm using and if nothing turns up I assume nothing changed. |
Since this warning cannot be hidden, is runtime-caching preferred for assets not controlled by webpack? |
Setting The new warning message is there in Is the presence of the warning breaking anything in your build, or do you just find it annoying? I don't know of a clean way of opting-out of that warning message for developers who "know what they're doing" and really do need to continue using |
Thanks for the quick reply! It's not breaking anything, but I would like to be able to hide it since I now understand the difference between the webpack-controlled assets and others that I want to pre-cache. Webpack lets me hide some other warnings, like the performance ones, by setting |
Thanks for passing along the prior art around configuring webpack to hide certain warnings. Seems like we could do something similar. I'll leave this issue open to track that. |
We're currently reporting things as per the recommended wepback approach. |
Library Affected:
workbox-webpack-plugin
Issue or Feature Request Description:
workbox-webpack-plugin
v3 introduced a model in which all assets in the webpack compilation are potentially eligible for precaching (with theinclude/exclude/chunks/excludeChunks
options available for modifying the defaults).Because of this new model, it's (usually) not necessary to use the previous
glob
-based configuration options, which matched files in the output filesystem, rather than matching against assets in the webpack compilation. But there are still some scenarios in which they might be necessary, so we didn't remove support, and documented them at https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#cache_additional_non-webpack_assetsIf you do use those
glob
-based options in v3, you end up generating an additional list of precached URLs, and options likemanifestTransforms
anddontCacheBustUrlsMatching
only apply to that additional list, not the list derived from the webpack asset pipeline.We should explicitly add one of two possible messages to
compilation.warnings
to let folks know about this scenarios. They are not always due to mistakes, so there might be some false positives, but if that's the case, it's easy enough to ignore the warning.globPatterns
or any of the related options is used, warn that it's often not needed, and link to the relevant docs.manifestTransforms
or any of the related options that modify theglob
-derived manifest is used, andglobPatterns
is not used, warn that those options will have no effect (because there is noglob
-derived manifest) and link to the relevant docs.The text was updated successfully, but these errors were encountered: