refine nginx caching strategy and add service worker update prompt with periodic checks
This commit is contained in:
@@ -9,10 +9,11 @@ export default defineConfig({
|
||||
react(),
|
||||
tailwindcss(),
|
||||
VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
registerType: 'prompt',
|
||||
manifest: false, // manifest.json from public
|
||||
workbox: {
|
||||
globPatterns: ['**/*.{js,css,html,ico,png,svg,json}'],
|
||||
cleanupOutdatedCaches: true,
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /^https:\/\/.*\/api\//,
|
||||
|
||||
Reference in New Issue
Block a user