[ci] yarn format
This commit is contained in:
parent
f165004c10
commit
f45936074e
3 changed files with 14 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
// Full Astro Configuration API Documentation:
|
||||
// https://docs.astro.build/reference/configuration-reference
|
||||
|
@ -11,6 +11,6 @@ import { VitePWA } from 'vite-plugin-pwa'
|
|||
// @ts-check
|
||||
export default /** @type {import('astro').AstroUserConfig} */ ({
|
||||
vite: {
|
||||
plugins: [VitePWA()]
|
||||
}
|
||||
plugins: [VitePWA()],
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { registerSW } from 'virtual:pwa-register'
|
||||
import { registerSW } from 'virtual:pwa-register';
|
||||
|
||||
const updateSW = registerSW({
|
||||
onNeedRefresh() {},
|
||||
onOfflineReady() {
|
||||
console.log("Offline ready");
|
||||
}
|
||||
})
|
||||
console.log('Offline ready');
|
||||
},
|
||||
});
|
||||
|
||||
updateSW();
|
||||
|
|
14
examples/with-vite-plugin-pwa/src/vite-env.d.ts
vendored
14
examples/with-vite-plugin-pwa/src/vite-env.d.ts
vendored
|
@ -1,11 +1,11 @@
|
|||
declare module 'virtual:pwa-register' {
|
||||
export type RegisterSWOptions = {
|
||||
immediate?: boolean
|
||||
onNeedRefresh?: () => void
|
||||
onOfflineReady?: () => void
|
||||
onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void
|
||||
onRegisterError?: (error: any) => void
|
||||
}
|
||||
immediate?: boolean;
|
||||
onNeedRefresh?: () => void;
|
||||
onOfflineReady?: () => void;
|
||||
onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void;
|
||||
onRegisterError?: (error: any) => void;
|
||||
};
|
||||
|
||||
export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void>
|
||||
export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue