- commit
- 58d8b6f
- parent
- 0feedf3
- author
- CheddarCrisp
- date
- 2020-02-06 22:08:53 +0100 CET
Properly set up default route
1 files changed,
+3,
-6
+3,
-6
1@@ -1,4 +1,4 @@
2-import {registerRoute} from 'workbox-routing';
3+import {registerRoute,setDefaultHandler} from 'workbox-routing';
4 import {CacheFirst, StaleWhileRevalidate, NetworkFirst} from 'workbox-strategies';
5 import {CacheableResponsePlugin} from 'workbox-cacheable-response';
6 import {ExpirationPlugin} from 'workbox-expiration';
7@@ -34,8 +34,5 @@ registerRoute(
8 cacheName: 'static-resources',
9 })
10 );
11-
12-registerRoute(
13- '/',
14- new NetworkFirst()
15-)
16+
17+setDefaultHandler(new NetworkFirst());