Configure for layer0 deployment

This commit is contained in:
Sam Carlton 2021-08-05 12:31:02 -05:00
parent f252322ccc
commit a8842fbb41
4 changed files with 32 additions and 0 deletions

9
sw/service-worker.js Normal file
View file

@ -0,0 +1,9 @@
import { skipWaiting, clientsClaim } from 'workbox-core'
import { precacheAndRoute } from 'workbox-precaching'
import { Prefetcher } from '@layer0/prefetch/sw'
skipWaiting()
clientsClaim()
precacheAndRoute(self.__WB_MANIFEST || [])
new Prefetcher().route()