1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-07-01 16:49:22 +00:00

Revert "更新sw"

This reverts commit 31969b15b0e3eacc83acacebf18f7dc1eef90427.
This commit is contained in:
SunWuyuan 2025-06-11 16:41:29 +08:00
parent cbddbeb0a1
commit b0541d1170
No known key found for this signature in database
GPG Key ID: A6A54CF66F56BB64

View File

@ -37,6 +37,12 @@ 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({
@ -156,8 +162,6 @@ export default defineConfig({
purpose: 'maskable'
}
],
id: 'classworks',
scope: './',
shortcuts: [
{
name: '随机点名',