URLをsw.jsに戻す
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { instance } from '@/instance';
|
||||
import { $i } from '@/account';
|
||||
import { api } from '@/os';
|
||||
import { lang, version } from '@/config';
|
||||
import { lang } from '@/config';
|
||||
|
||||
export async function initializeSw() {
|
||||
if (!('serviceWorker' in navigator)) return;
|
||||
|
||||
navigator.serviceWorker.register(`/sw.${version}.js`, { scope: '/', type: 'classic' });
|
||||
navigator.serviceWorker.register(`/sw.js`, { scope: '/', type: 'classic' });
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.active?.postMessage({
|
||||
msg: 'initialize',
|
||||
|
Reference in New Issue
Block a user