dervondenbergen
How to access buildId/build hash at runtime?
Are you looking for something like the
app:manifest:update
hook? From the Nuxt docs:
Called when there is a newer version of your app detected.Behind the hook there is actually just a request to
_nuxt/builds/latest.json
and if the id changed, the hook gets triggered: https://github.com/nuxt/nuxt/blob/f78da087df40e08f2e9239be10a11a75fac07db8/packages/nuxt/src/app/plugins/check-outdated-build.client.ts
You can also define the interval, if the default one of 1 hour is not fitting: https://nuxt.com/docs/api/nuxt-config#checkoutdatedbuildinterval3 replies