From 37c37b4f4b20bff69cfb7868e433e272d65cdbcc Mon Sep 17 00:00:00 2001 From: ayoayco Date: Wed, 14 Aug 2024 18:58:55 +0200 Subject: [PATCH] fix: use correct cache version --- astro.config.mjs | 3 +++ src/components/Footer.astro | 5 ++++- src/consts.ts | 4 +++- src/sw.js | 14 ++++++++++++-- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index f587b1f..2fb540c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,8 @@ import mdx from '@astrojs/mdx'; import sitemap from '@astrojs/sitemap'; import serviceWorker from "@ayco/astro-sw"; +import {VERSION} from './src/consts'; + // https://astro.build/config export default defineConfig({ output: "hybrid", @@ -16,6 +18,7 @@ export default defineConfig({ serviceWorker({ path: "./src/sw.js", assetCachePrefix: 'cozy-reader', + assetCacheVersionID: VERSION }) ] }); \ No newline at end of file diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 5cd2e77..414947d 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,5 +1,6 @@ --- import Icon from 'astro-iconify' +import {VERSION} from '../consts'; ---