PWA支持
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 14s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s

This commit is contained in:
孙诚
2025-12-25 14:15:43 +08:00
parent b14efd8d16
commit a9dfcdaa5c
19 changed files with 485 additions and 5 deletions

View File

@@ -15,4 +15,18 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
build: {
// 确保 Service Worker 和 manifest 被正确复制
rollupOptions: {
input: {
main: fileURLToPath(new URL('./index.html', import.meta.url))
}
}
},
server: {
headers: {
// 允许 Service Worker 在开发环境中工作
'Service-Worker-Allowed': '/'
}
}
})