🎉 What's New?
Added the disable()
method to workbox.navigationPreload
workbox.navigationPreload
provides anenable()
method to enable navigation preload, but it did not provide a way to disable it (without invoking the underlying service worker APIs). Now developers can callworkbox.navigationPreload.disable()
to disable navigation preload. (#1651)
The method
option can now be used for runtime caching via generateSW()
- Incorrect validation logic was preventing the
method
option from being used by runtime caching configuration ingenerateSW()
. Thanks to @chrisdns, this has been fixed! (#1638)
Bug fixes and ergonomic improvements
- Using
workbox.expiration.Plugin
withpurgeOnQuotaError
set totrue
would result in an error. Thanks to @salmoro for discovering and fixing the issue! (#1643). - Plugin lifecycle callbacks previously were not called with the
event
that triggered them, so developers writing custom plugins could not access any information about the event in those callback. Now all plugin callback are passed the event object (when available). (#1640) - The
workbox-streams
package'sstrategy()
method is exposed on the browser build ofworkbox.streams
that gets loaded by theworkbox-sw
loader, but it wasn't exported by the module in a way that was accessible to module bundlers. Now it's possible to import{strategy}
fromworkbox-streams/strategy.mjs
. (#1635).
📖 Learn More
Check out our docs @ developers.google.com/web/tools/workbox/