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
1 changed files with 1 additions and 1 deletions

View File

@ -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(