| Name | Modified | Size | Downloads / 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
navigationPreloadconfig property (defaulting tofalse) toworkbox-build'sgenerateSWandgenerateSWStringmodes, which would also expose it to the wrappers likeworkbox-cliandworkbox-webpack-plugin. [#1981]
workbox-core
-
Adds
workbox.core.cacheNames.prefixandworkbox.core.cacheNames.suffixfor accessing the current prefix and suffix used in generating cache names. [#2001] -
Adds a new
cacheKeyWillBeUsedlifecycle 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
webpackloaders [#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.