update: 优化 PWA 配置,添加自动更新注册

This commit is contained in:
xiongxiao
2026-03-19 05:08:27 +08:00
committed by cnb
parent a65e7b236d
commit 6b72054525

View File

@@ -32,6 +32,7 @@ export default defineConfig({
tailwindcss(), tailwindcss(),
VitePWA({ VitePWA({
injectRegister: 'auto', injectRegister: 'auto',
registerType: 'autoUpdate',
workbox: { workbox: {
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10MB maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10MB
} }