Skip to content

fix: preload pdfjs worker for server imports - #70

Merged
Talljack merged 1 commit into
mainfrom
fix/pdfjs-worker-runtime
Jun 6, 2026
Merged

Talljack merged 1 commit into
mainfrom
fix/pdfjs-worker-runtime

Conversation

@Talljack

@Talljack Talljack commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • preload pdf.worker.mjs in the Node PDF extraction path
  • register WorkerMessageHandler on globalThis.pdfjsWorker so server imports do not rely on runtime relative worker resolution
  • keep the existing DOM geometry polyfill path intact

Verification

  • pnpm typecheck
  • pnpm lint
  • pnpm test src/lib/extract-text.test.ts
  • pnpm build
  • node script: extract /tmp/bbc-office-english.pdf via extractPdf
  • local POST /api/import/pdf with the BBC PDF file returns extracted text

@vercel

vercel Bot commented Jun 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
echo-type Ready Ready Preview, Comment Jun 6, 2026 5:53am

@Talljack
Talljack merged commit c462b67 into main Jun 6, 2026
6 checks passed
@Talljack
Talljack deleted the fix/pdfjs-worker-runtime branch June 6, 2026 05:54

This branch was successfully deployed

1 active deployment
Preview — 63e65526 Deployed Jun 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant