chore: fix readme example
This commit is contained in:
parent
260eac3462
commit
14ccfd3379
1 changed files with 11 additions and 9 deletions
|
@ -82,6 +82,7 @@ export default defineConfig({
|
|||
integrations: [
|
||||
serviceWorker({
|
||||
path: "./src/sw.ts",
|
||||
registrationHooks: {
|
||||
afterRegistration: async () => {
|
||||
const sw = await navigator.serviceWorker.getRegistration();
|
||||
console.log('>>> registrered', sw)
|
||||
|
@ -91,6 +92,7 @@ export default defineConfig({
|
|||
active: () => console.log('active...'),
|
||||
error: (error) => console.error(error),
|
||||
unsupported: () => console.log(':('),
|
||||
}
|
||||
})
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue