Skip to content

fix: support PDF previews in WebKit - #234

Merged
massimoalbarello merged 1 commit into
mainfrom
codex/fix-pdf-request-cache
Nov 1, 2026
Merged

massimoalbarello merged 1 commit into
mainfrom
codex/fix-pdf-request-cache

Conversation

@massimoalbarello

Copy link
Copy Markdown
Owner

Why

PDF previews call Map.prototype.getOrInsertComputed, which WebKit does not implement. As a result, both embedded knowledge-page PDFs and asset previews fail to render on iOS.

How

Configure Vite to resolve PDF.js to its legacy distribution and copy the matching legacy worker. The legacy build supplies the missing compatibility polyfill, while keeping the main thread and worker on the same PDF.js version.

@massimoalbarello
massimoalbarello merged commit bab0a66 into main Nov 1, 2026
10 checks passed
@massimoalbarello
massimoalbarello deleted the codex/fix-pdf-request-cache branch November 1, 2026 21:07
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