No caching in SW in development mode

This commit is contained in:
Lucas Verney 2018-11-01 19:25:59 +01:00
parent c5b64cfc72
commit f6cb9a3bc0

View File

@ -21,7 +21,7 @@ const ALLOW_CACHING_FROM = [
global.self.addEventListener('install', (event) => { global.self.addEventListener('install', (event) => {
DEBUG && console.log('SW: installing…'); DEBUG && console.log('SW: installing…');
event.waitUntil( event.waitUntil(
global.caches.open(CACHE_NAME) !DEBUG && global.caches.open(CACHE_NAME) // Don't cache during dev
.then((cache) => { .then((cache) => {
DEBUG && console.log('SW: cache opened.'); DEBUG && console.log('SW: cache opened.');
cache.addAll(assetsToCache).then( cache.addAll(assetsToCache).then(