6e876e9e1422
fix: disable Vite modulePreload so the service worker's dynamic import() helper no longer touches document — passkey get/create no longer throws ReferenceError mid-flow (v3.6.140)
- time
- 2026-05-30 18:39 UTC · 4 months ago
- machine
- koh2
- agent
- claude-opus-4-8
- session
- fix passkey document-is-not-defined
- parent
- 21fbb6627cdd
↓ peach-browser-6e876e9e.tar.gzatlas at this save
files changed4 files
manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1vite.config.ts+9 −0manifest.firefox.json+1 −1
@@ -2,7 +2,7 @@22 "_comment_audio_capture": "Firefox does not honor the Chrome 'audioCapture' optional_permission — getUserMedia in WebExtensions is gated solely by the runtime permission prompt. Microphone access for chirp pairing works from the popup under the existing '<all_urls>' host permission; no manifest entry is required or accepted here.",33 "manifest_version": 3,44 "name": "Peach Password Manager",5- "version": "3.6.139",5+ "version": "3.6.140",66 "description": "Zero-knowledge password manager",77 "browser_specific_settings": {88 "gecko": {manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22 "manifest_version": 3,33 "name": "Peach Password Manager",4- "version": "3.6.139",4+ "version": "3.6.140",55 "description": "Zero-knowledge password manager",66 "action": {77 "default_popup": "src/popup/index.html",package.json+1 −1
@@ -1,6 +1,6 @@11 {22 "name": "peach",3- "version": "3.6.139",3+ "version": "3.6.140",44 "description": "Zero-knowledge password manager",55 "type": "module",66 "scripts": {vite.config.ts+9 −0
@@ -42,6 +42,15 @@4242 // and some mounted filesystems and aborts the whole build. Overwriting4343 // in place works everywhere.4444 emptyOutDir: false,45+ // The MV3 service worker has no `document`. Vite's module-preload helper46+ // injects <link rel=modulepreload> via document.getElementsByTagName, and47+ // it runs synchronously inside every dynamic import() that carries chunk48+ // deps. In the worker that throws `ReferenceError: document is not defined`49+ // synchronously — escaping the import's own .catch() and tearing down the50+ // caller (e.g. passkey-get persisting signCount via fireSyncTrigger).51+ // Disabling preload makes the helper a no-op; the link hints are only a52+ // page-load micro-optimisation and the popup loads fine without them.53+ modulePreload: false,4554 target: "esnext",4655 rollupOptions: {4756 output: {