Properly set up default route

This commit is contained in:
CheddarCrisp 2020-02-06 16:08:53 -05:00
parent 0feedf3a4b
commit 58d8b6fe36

View file

@ -1,4 +1,4 @@
import {registerRoute} from 'workbox-routing'; import {registerRoute,setDefaultHandler} from 'workbox-routing';
import {CacheFirst, StaleWhileRevalidate, NetworkFirst} from 'workbox-strategies'; import {CacheFirst, StaleWhileRevalidate, NetworkFirst} from 'workbox-strategies';
import {CacheableResponsePlugin} from 'workbox-cacheable-response'; import {CacheableResponsePlugin} from 'workbox-cacheable-response';
import {ExpirationPlugin} from 'workbox-expiration'; import {ExpirationPlugin} from 'workbox-expiration';
@ -34,8 +34,5 @@ registerRoute(
cacheName: 'static-resources', cacheName: 'static-resources',
}) })
); );
registerRoute( setDefaultHandler(new NetworkFirst());
'/',
new NetworkFirst()
)