Skip to content

Add optional PWA support to Dist#82

Draft
yozhgoor wants to merge 4 commits into
mainfrom
pwa
Draft

Add optional PWA support to Dist#82
yozhgoor wants to merge 4 commits into
mainfrom
pwa

Conversation

@yozhgoor
Copy link
Copy Markdown
Member

@yozhgoor yozhgoor commented Apr 28, 2026

Summary

  • Add a new optional pwa feature and Dist::pwa(Pwa) builder to enable PWA artifact generation during dist builds.
  • Introduce Pwa/PwaIcon configuration in src/pwa.rs, with generation of manifest.json and sw.js only when those files are missing (custom assets remain authoritative).
  • Generate service worker precache entries from the final dist contents (sorted + deduped), excluding sw.js, *.map, and *.txt.
  • Re-export PWA types from lib.rs behind the pwa feature and wire PWA application into the Dist::build pipeline.
  • Extend dev server content types to better support PWA assets (json, png, svg).

Behavior

  • Existing workflows are unchanged unless the pwa feature is enabled and .pwa(...) is used.
  • In PWA mode, generated files are fallback defaults only; user-provided assets always take precedence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant