From 06352e350da7a5684be7ad218a4fc62e5c53fb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zarach?= Date: Fri, 16 Feb 2024 18:03:42 +0100 Subject: [PATCH] fix(nuxt): bypass browser cache when fetching app build id (#25813) --- packages/nuxt/src/app/plugins/check-outdated-build.client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/app/plugins/check-outdated-build.client.ts b/packages/nuxt/src/app/plugins/check-outdated-build.client.ts index c2d8c78ecce0..e0b80462ca12 100644 --- a/packages/nuxt/src/app/plugins/check-outdated-build.client.ts +++ b/packages/nuxt/src/app/plugins/check-outdated-build.client.ts @@ -14,7 +14,7 @@ export default defineNuxtPlugin((nuxtApp) => { const currentManifest = await getAppManifest() if (timeout) { clearTimeout(timeout) } timeout = setTimeout(getLatestManifest, 1000 * 60 * 60) - const meta = await $fetch(buildAssetsURL('builds/latest.json')) + const meta = await $fetch(buildAssetsURL('builds/latest.json') + `?${Date.now()}`) if (meta.id !== currentManifest.id) { // There is a newer build which we will let the user handle nuxtApp.hooks.callHook('app:manifest:update', meta)