A platform for community discussion. Free, open, simple.
FIX: Update workbox class references following version bump (#22108)
David Taylora49b45dc14bc
diff --git a/app/assets/javascripts/service-worker.js.erb b/app/assets/javascripts/service-worker.js.erbindex f7fb42821c4..3a320b0d83b 100644--- a/app/assets/javascripts/service-worker.js.erb+++ b/app/assets/javascripts/service-worker.js.erb@@ -41,10 +41,10 @@ workbox.routing.registerRoute(new workbox.strategies.NetworkFirst({ // This will only use the cache when a network request failscacheName: discourseCacheName,plugins: [- new workbox.cacheableResponse.Plugin({+ new workbox.cacheableResponse.CacheableResponsePlugin({statuses: [200] // opaque responses will return status code '0'}), // for s3 secure uploads signed urls- new workbox.expiration.Plugin({+ new workbox.expiration.ExpirationPlugin({maxAgeSeconds: 7* 24 * 60 * 60, // 7 daysmaxEntries: 250,purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage@@ -93,10 +93,10 @@ if (cdnUrls.length > 0) {credentials: 'omit'},plugins: [- new workbox.cacheableResponse.Plugin({+ new workbox.cacheableResponse.CacheableResponsePlugin({statuses: [200] // opaque responses will return status code '0'}),- new workbox.expiration.Plugin({+ new workbox.expiration.ExpirationPlugin({maxAgeSeconds: 7* 24 * 60 * 60, // 7 daysmaxEntries: 250,purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage@@ -124,10 +124,10 @@ workbox.routing.registerRoute(new workbox.strategies.NetworkFirst({ // This will only use the cache when a network request failscacheName: externalCacheName,plugins: [- new workbox.cacheableResponse.Plugin({+ new workbox.cacheableResponse.CacheableResponsePlugin({statuses: [200] // opaque responses will return status code '0'}),- new workbox.expiration.Plugin({+ new workbox.expiration.ExpirationPlugin({maxAgeSeconds: 7* 24 * 60 * 60, // 7 daysmaxEntries: 250,purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage