GoogleChromeLabs / sw-precache

[Deprecated] A node module to generate service worker code that will precache specific resources so they work offline.
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
5.23k stars 389 forks source link

RuntimeCaching is not working when handleFetch is set to false. #377

Open StoyanPenev opened 5 years ago

StoyanPenev commented 5 years ago

Hi there, In the service-worker.tmpl the runtime caching and swToolboxCode variables are not rendered if handleFetch is disabled. Why those should be dependent on each other? I have created a custom template for my case but I guess this can be more flexible to allow both runtime caching and custom fetch handling. I banged my head for several hours in complete frustration before realizing what is happening. So I decided to make an issue out of it.