npm workbox-google-analytics 2.1.0
Workbox 2.1.0

latest releases: 7.1.0, 7.0.0, 6.6.1...
6 years ago

What's new?

The 2.1.0 release fixes a longstanding issue in workbox-sw that could cause routes established via router.registerRoute() to inadvertently take precedence over the internal route that is intended for precached assets.

As described in this issue, the impacted code might look like:

// The internal route to serve the precached assets *should* have
// taken precedence... but prior to the 2.1.0 release, it didn't.
workboxSW.precache([]);

// This is a very broad wildcard match!
// Previously, it would cause precached assets to be served network-first.
// As of the 2.1.0 release, it will no longer apply to precached assets.
workboxSW.router.registerRoute(
  '/*',
  workboxSW.strategies.networkFirst()
);

Our documentation states that precached assets are always served via a cache-first route, so this previous behavior is considered a bug.

If, for some reason, your service worker depended on this buggy behavior, please update your code prior to upgrading to 2.1.0.

Bug Fixes

Don't miss a new workbox-google-analytics release

NewReleases is sending notifications on new releases.