Vite Ruby combined with vite-plugin-pwa #147
Replies: 2 comments 1 reply
-
Hi Sumit! @sumitngupta
You can usually configure headers in your CDN to ensure assets are cached forever:
If you are not using a CDN, you would still be able to configure the Are you sure you need a service worker? Regarding When using Vite Ruby, there is typically no It's likely that the default configuration is not suitable for a server-rendered app. You might want to consider using workbox directly instead. |
Beta Was this translation helpful? Give feedback.
-
I too am looking to add PWA support, mostly to provide an installable app. Having added the PWA plugin, I can see the manifest.webmanifest gets created and dumped in What does seem to be missing is support for a local development tag, something to generate the link to, and serve the manifest.webmanifest file. If I manually go to https://localhost:3036/vite-dev/manifest.webmanifest I just get the default vite ruby page |
Beta Was this translation helpful? Give feedback.
-
Hello!
First off, love the library. It has been a breath of fresh air and revitalized our entire frontend dev process here at DoubleLoop. I'll be upfront that I'm pretty inexperienced when it comes to configuring complicated frontend frameworks so this was amazing in its simplicity.
I was looking into how to use service workers to cache the chunks / static assets for users and found the https://github.com/antfu/vite-plugin-pwa library. I was wondering if there is already a documented way to get the two libraries to work well together? I presume using the manifests.
Just wondering if my googling / searching was off target and the documentation already exists. Thanks again for the awesome work you do.
Beta Was this translation helpful? Give feedback.
All reactions