vite-plugin-pwa: navigateFallbackDenylist is not working with generateSW Strategy
Hi I want to exclude contents of locales folder completely from getting pre-cached however thats not working. And similarly the runtime cache for locales folder also doesn’t work.
The locales folder is inside src/locales/*.json and I want to avoid precaching locales folder, however even after adding to navigateFallbackDenylist it still gets pre-cached under assets.
This is how I do it 👇🏻
navigateFallbackDenylist: [new RegExp("locales/[^/]+.json")]
Is this because locales are not inside public folder but src ? However since I am using it in code to import so I cannot move it outside src folder.
Please let me know how can I fix this If I want to use generateSW strategy
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 58 (35 by maintainers)
looks like the above strategy is working and first load + offline issue seems to be resolved https://excalidraw-9xup84w1r-excalidraw.vercel.app/
@userquin I was able to resolve the remaining issues with what you suggested ✨
Thanks a ton ❤️