Open arackaf opened 6 years ago
First, can I ask if sw-precache will continue to be maintained? It appears as though
https://workboxjs.org/
is set up to replace this?
This configuration
new SWPrecacheWebpackPlugin({ runtimeCaching: [{ urlPattern: /junk\/file1a\.js\?ver=.*/, handler: 'cacheFirst', options: { cache: { maxEntries: 1, name: 'dist-resources' }, successResponses: /200/, }, }],
works fine, but, for those users unsure where to put successResponses (it doesn't seem to be documented), if they put it inside the cache object
new SWPrecacheWebpackPlugin({ runtimeCaching: [{ urlPattern: /junk\/file1a\.js\?ver=.*/, handler: 'cacheFirst', options: { cache: { maxEntries: 1, name: 'dist-resources', successResponses: /200/, }, }, }],
then the service worker gets generated with this
toolbox.router.get(/junk\/file1a\.js\?ver=.*/, toolbox.cacheFirst, {"cache":{"maxEntries":1,"name":"dist-resources","successResponses":{}}});
where successResponses.test will now of course be undefined.
First, can I ask if sw-precache will continue to be maintained? It appears as though
https://workboxjs.org/
is set up to replace this?
This configuration
works fine, but, for those users unsure where to put successResponses (it doesn't seem to be documented), if they put it inside the cache object
then the service worker gets generated with this
where successResponses.test will now of course be undefined.