vite-pwa / vite-plugin-pwa

Zero-config PWA for Vite

Home Page:https://vite-pwa-org.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Needed help with configuring React app with vite-plugin-pwa

SudhanshuBhagwat opened this issue · comments

I have been trying to setup a bare react project without the 2 service worker files mentioned in the guide but haven't been able to do so.
Either the service worker is not correctly generated or the manifest isn't generated at all.
I even tried the react router example, but that doesn't generate the manifest file either.

The following is the link to my working branch: https://github.com/SudhanshuBhagwat/diner/tree/configure-pwa

@SudhanshuBhagwat try removing inject register option from the plugin and the link for the manifest on index.html

Since you are using inject manifest strategy the workbox option on the plugin option will be ignored.

The included assets option is wrong, you should declare each asset or use some glob dep to list them, such as fast-glob: you can also use the globPatterns using injectManifest option on plugin configuration

closing this, feel free to open a new issue