vite-plugin-pwa
vite-plugin-pwa copied to clipboard
Allow only generating webmanifest (without service worker) as strategy
Description
This PR aims to add a very simple webManifestOnly strategy to the plugin, which does not generate a service worker at all. This is useful for very minimal setups, which want to generate just a webmanifest file (possibly with additional assets generated through the assets-generator plugin).
Linked Issues
N/A
Additional Context
[!TIP] The author of this PR can publish a preview release by commenting
/publishbelow.
Deploy Preview for vite-plugin-pwa-legacy ready!
| Name | Link |
|---|---|
| Latest commit | e4a3c75fc292f1e0dacb05909f88e8c0c4ee67ff |
| Latest deploy log | https://app.netlify.com/sites/vite-plugin-pwa-legacy/deploys/6790d6d4caf5ee0008fe4a19 |
| Deploy Preview | https://deploy-preview-815--vite-plugin-pwa-legacy.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
To check the webmanifest you only need to add the plugin with empty options (the plugin will add some entries from the package.json), just enable dev options and test it in private browsing.
I think this can be done also adding a manifest.json to public folder and registering the manifest link in the head, adding also this entry to the manifest.json file, and disabling the manifest (manifest: false) in the pwa options if plugin registered:
{
"$schema": "https://json.schemastore.org/web-manifest-combined.json"
}
The problem is about checking the new strategy here and all integrations when can be done on the user land, right now I'm very busy but will keep this PR open, be patient :pray:.
I'd love to see this feature get merged