nuxt icon indicating copy to clipboard operation
nuxt copied to clipboard

How to disable caching "_nuxt" folder due to "The server responded with a status of 429" after every update!!!

Open makamekm opened this issue 1 year ago • 4 comments

There is an issue after every update. The SW does not send new files from _nuxt folder and do not recache them. The clients need to restart the browser completely to make it work several times.

makamekm avatar Jan 09 '24 21:01 makamekm

Add registerType: 'autoUpdate' to you PWA options, default value is prompt, and so a new sw version will be awaiting for user/client SKIP_WAITING message:

  • https://vite-pwa-org.netlify.app/guide/auto-update.html#plugin-configuration
  • https://vite-pwa-org.netlify.app/guide/prompt-for-update.html#plugin-configuration

userquin avatar Jan 09 '24 21:01 userquin

_nuxt folder contains all client assets, by default PWA module will precache all assets, if you want to disable precaching then add workbox.injectionPoint = undefined (use object notation) in your PWA options.

userquin avatar Jan 09 '24 22:01 userquin

This is the configuration. Do I miss something? image

makamekm avatar Jan 09 '24 22:01 makamekm

Can you provide a minimal reproduction?

userquin avatar Jan 09 '24 22:01 userquin