Failed to load the script unexpectedly回避
sw.jsとlib.tsを分離してみた
This commit is contained in:
parent
7e5ab7af1b
commit
47d77d14fd
6 changed files with 62 additions and 28 deletions
|
|
@ -8,7 +8,7 @@ export async function initializeSw() {
|
|||
('serviceWorker' in navigator) &&
|
||||
('PushManager' in window) &&
|
||||
$i && $i.token) {
|
||||
navigator.serviceWorker.register(`/sw.js`, { scope: '/', type: 'module' });
|
||||
navigator.serviceWorker.register(`/sw.js`, { scope: '/', type: 'classic' });
|
||||
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.active?.postMessage({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue