PWA支持
This commit is contained in:
@@ -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': '/'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user