Properly set up default route
This commit is contained in:
parent
0feedf3a4b
commit
58d8b6fe36
1 changed files with 3 additions and 6 deletions
|
@ -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';
|
||||||
|
@ -35,7 +35,4 @@ registerRoute(
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
registerRoute(
|
setDefaultHandler(new NetworkFirst());
|
||||||
'/',
|
|
||||||
new NetworkFirst()
|
|
||||||
)
|
|
Loading…
Add table
Add a link
Reference in a new issue