Skip to content

Commit

Permalink
fix(nuxt): bypass browser cache when fetching app build id (#25813)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalzaq12 committed Feb 16, 2024
1 parent 4fd4f95 commit 06352e3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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<NuxtAppManifestMeta>(buildAssetsURL('builds/latest.json'))
const meta = await $fetch<NuxtAppManifestMeta>(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)
Expand Down

0 comments on commit 06352e3

Please sign in to comment.