mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2025-07-02 00:59:23 +00:00
更新sw
This commit is contained in:
parent
4029e449d8
commit
31969b15b0
@ -37,12 +37,6 @@ export default defineConfig({
|
||||
console.info('当前环境不支持 ServiceWorker');
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.location.protocol === 'file:') {
|
||||
console.info('在file://协议下ServiceWorker不可用');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const { registerSW } = await import('virtual:pwa-register');
|
||||
const registration = await registerSW({
|
||||
@ -162,6 +156,8 @@ export default defineConfig({
|
||||
purpose: 'maskable'
|
||||
}
|
||||
],
|
||||
id: 'classworks',
|
||||
scope: './',
|
||||
shortcuts: [
|
||||
{
|
||||
name: '随机点名',
|
||||
|
Loading…
x
Reference in New Issue
Block a user