Download Latest Version Workbox v7.4.1 source code.zip (1.5 MB)
Email in envelope

Get an email when there's a new version of workbox

Home / v4.2.0
Name Modified Size InfoDownloads / Week
Parent folder
workbox-v4.2.0.tar.gz 2019-04-03 277.7 kB
workbox-v4.2.0.zip 2019-04-03 351.1 kB
README.md 2019-04-03 1.5 kB
Workbox v4.2.0 source code.tar.gz 2019-04-03 593.4 kB
Workbox v4.2.0 source code.zip 2019-04-03 945.1 kB
Totals: 5 Items   2.2 MB 0

🎉 What's New?

Build Tools

  • Adds a new navigationPreload config property (defaulting to false) to workbox-build's generateSW and generateSWString modes, which would also expose it to the wrappers like workbox-cli and workbox-webpack-plugin. [#1981]

workbox-core

  • Adds workbox.core.cacheNames.prefix and workbox.core.cacheNames.suffix for accessing the current prefix and suffix used in generating cache names. [#2001]

  • Adds a new cacheKeyWillBeUsed lifecycle callback. This allows developers to override the default cache key for reads or writes (or both). [#1990]

The interface for the callback looks like:

:::js
async function cacheKeyWillBeUsed({request, mode}) {
  // request is the default Request object that would otherwise be used as the cache key.
  // mode is either 'read' or 'write', depending on whether it's a read or a write.
  // Return either a string, or a Request whose url property will be used as the cache key.
  // Returning the original request will make this a no-op.
}

🐛 What's Fixed?

workbox-webpack-plugin

  • Convert source to Buffer when getting asset's hash, improving compatibility with some webpack loaders [#1966].
  • Added sorting before generating a hash in the precache manifest. [#1973]

Thanks!

Special thanks to @merrywhether, @3846masa and @el for contributions that went into this release.

Source: README.md, updated 2019-04-03