fix: clean production console CSP and source map noise
Merged
GR
4mo ago+20+20+01234567890123456789-4-4-0123456789
Summary
- Disable production source maps for PWA and Admin Vite builds (removes DevTools CSP noise from
*.maprequests) - Always include
favicon.pngandapp-icon.pngin CSPimg-src(assets plugin may write them after the CSP scan) - Add standard
mobile-web-app-capablemeta alongside the Apple-specific tag - Migrate remaining
lit-elementimports tolit/lit/decorators.js
Test plan
-
PL_PWA_URL=… PL_SERVER_URL=… pnpm --filter @padloc/pwa run buildsucceeds - Build output contains zero
*.mapfiles - Built
index.htmlCSPimg-srcincludes/favicon.pngand/app-icon.png - Built HTML includes
mobile-web-app-capable - Deploy and confirm browser console is clean on prod unlock page (no CSP map/favicon violations, no lit-element deprecation)
Summary by cubic
Clean up the production browser console by removing CSP and source map warnings in the PWA and Admin builds. Add the mobile-web-app-capable meta and finish migrating off lit-element.
-
Changes
- Disable prod source maps for PWA/Admin Vite builds.
- Always include
favicon.pngandapp-icon.pngin CSPimg-src. - Add
mobile-web-app-capablemeta to PWA/Admin HTML. - Replace remaining
lit-elementimports withlitandlit/decorators.js(e.g.,rich-input,tags-input).
-
Testing
pnpm --filter @padloc/pwa run buildandpnpm --filter @padloc/admin run buildsucceed.- No
*.mapfiles in outputs; built HTML includes the new meta and CSP entries. - Follow-up: Deploy and verify the production unlock page console is clean (no CSP or deprecation warnings).
Summary by CodeRabbit
- New Features
- Added support for installing and launching the web app as a mobile application (mobile web app capability metadata added for both admin and PWA).
- Bug Fixes
- Improved favicon and app icon display by ensuring these icons are allowed under the app’s content security settings.
- Improvements
- Enhanced consistency and reliability across the admin and PWA experiences.