feat: 添加 Flutter Web 构建产物

- 更新 .gitignore 允许 flutter_monisuo/build/web 目录
- 添加 Flutter Web release 构建文件

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 01:47:44 +08:00
parent 7be22da0f0
commit 613d800ef9
142 changed files with 210264 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
'use strict';
self.addEventListener('install', () => {
self.skipWaiting();
});
self.addEventListener('activate', (event) => {
event.waitUntil(
(async () => {
try {
await self.registration.unregister();
} catch (e) {
console.warn('Failed to unregister the service worker:', e);
}
try {
const clients = await self.clients.matchAll({
type: 'window',
});
// Reload clients to ensure they are not using the old service worker.
clients.forEach((client) => {
if (client.url && 'navigate' in client) {
client.navigate(client.url);
}
});
} catch (e) {
console.warn('Failed to navigate some service worker clients:', e);
}
})()
);
});