From f6cb9a3bc07db2d67132dcbb69ec61cf318b241b Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 1 Nov 2018 19:25:59 +0100 Subject: [PATCH] No caching in SW in development mode --- src/sw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sw.js b/src/sw.js index 007bcc4..b3c9820 100644 --- a/src/sw.js +++ b/src/sw.js @@ -21,7 +21,7 @@ const ALLOW_CACHING_FROM = [ global.self.addEventListener('install', (event) => { DEBUG && console.log('SW: installing…'); event.waitUntil( - global.caches.open(CACHE_NAME) + !DEBUG && global.caches.open(CACHE_NAME) // Don't cache during dev .then((cache) => { DEBUG && console.log('SW: cache opened.'); cache.addAll(assetsToCache).then(