summaryrefslogtreecommitdiff
path: root/examples/with-vite-plugin-pwa/src/index.ts
blob: 187159528f8c16e5b46db4650b66a026d12c9b7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import { registerSW } from 'virtual:pwa-register';

const updateSW = registerSW({
  onNeedRefresh() {},
  onOfflineReady() {
    console.log('Offline ready');
  },
});

updateSW();