Skip to content

Commit

Permalink
feat: add sw skipWaiting
Browse files Browse the repository at this point in the history
  • Loading branch information
ludchieng committed May 21, 2023
1 parent a77bb8c commit 60c6517
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions public/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { CacheFirst } from 'workbox-strategies'

precacheAndRoute(self.__WB_MANIFEST || [])

self.addEventListener('install', () => self.skipWaiting())

registerRoute(
({ url }) => url.pathname.startsWith('/img/lines-icons/'),
new CacheFirst({
Expand Down

0 comments on commit 60c6517

Please sign in to comment.