Fix animation stale reference

This commit is contained in:
2026-07-21 16:03:28 +10:00
parent d2d82ae6ae
commit 9af84760fa
12 changed files with 225 additions and 38 deletions

View File

@@ -8,11 +8,24 @@ export default defineConfig({
base: './',
root: path.resolve(__dirname, 'apps/demo'),
publicDir: path.resolve(__dirname, 'public'),
define: {
__NVR_BUILD_ID__: JSON.stringify(new Date().toISOString()),
},
server: {
// iOS Safari can otherwise retain a tunnelled development response after
// the dev server has restarted with a new build.
headers: { 'Cache-Control': 'no-store' },
},
preview: {
// Production hosts should apply the same policy at least to index.html and
// sw.js. Fingerprinted assets can use immutable caching when deployed.
headers: { 'Cache-Control': 'no-cache' },
},
plugins: [
vue(),
tailwindcss(),
VitePWA({
registerType: 'prompt',
registerType: 'autoUpdate',
devOptions: {
enabled: true,
navigateFallback: 'index.html',
@@ -39,6 +52,8 @@ export default defineConfig({
},
workbox: {
cleanupOutdatedCaches: true,
clientsClaim: true,
skipWaiting: true,
navigateFallback: '/index.html',
globPatterns: ['**/*.{js,css,html,svg,png,woff2}'],
},