Closed mdelarioja closed 6 years ago
I already migrated Workbox from v2 to v3 recently. You can upgrade this plugin to v2.0.1.
So that you can use Workbox Plugins in your service-worker.js
like that:
// my-service-worker.js
workbox.routing.registerRoute(
new RegExp('/images/'),
workbox.strategies.cacheFirst({
cacheName: 'image-cache',
plugins: [
new workbox.expiration.Plugin({
maxEntries: 20,
}),
],
})
);
@xiaoiver Thank you for all your work on this!
Thanks for the great work on this!
It would be helpful to be able to configure the use of plugins to, for example, set expiration and limit the number of files that are cached.