-
Notifications
You must be signed in to change notification settings - Fork 830
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
Warn during multi-compilation scenarios #2245
Conversation
@@ -80,6 +81,17 @@ class GenerateSW { | |||
* @private | |||
*/ | |||
async handleEmit(compilation) { | |||
// See https://github.com/GoogleChrome/workbox/issues/1790 | |||
if (this.alreadyCalled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about putting this logic in a reusable module, but it a) relies on instance properties of the plugin and b) relies on the compilation
object being available. It ended up being cleaner just duplicating this logic in both plugin classes, but if there are strong feelings, I could refactor.
PR-Bot Size PluginChanged File Sizes
New FilesNo new files have been added. All File SizesView Table
Workbox Aggregate Size Plugin3.51KB gzip'ed (23% of limit) |
R: @philipwalton
This addresses some of #1790 by adding in a
webpack
compilation warning message letting developers know that they shouldn't rely on a consistent set of assets in the precache manifest when the same plugin instance is used across multiple compilations (such as in--watch
scenarios).