Skip to content

Commit

Permalink
chore: dynamic import when required
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Sep 17, 2022
1 parent 69ba280 commit eb487b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/build/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function registerSW(options: RegisterSWOptions = {}) {
}

async function register() {
const { Workbox, messageSW } = await import('workbox-window')
if ('serviceWorker' in navigator) {
const { Workbox, messageSW } = await import('workbox-window')
sendSkipWaitingMessage = async () => {
if (registration && registration.waiting) {
// Send a message to the waiting service worker,
Expand Down

0 comments on commit eb487b9

Please sign in to comment.