From 2a0174b8ccbe31eb88a14dad9e67dfb93f3e2b25 Mon Sep 17 00:00:00 2001 From: Kewin Wereszczynski Date: Thu, 9 Jan 2025 15:39:30 +0100 Subject: [PATCH] chore: add comment --- packages/document-loaders/src/utils/pdf/loader.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/document-loaders/src/utils/pdf/loader.ts b/packages/document-loaders/src/utils/pdf/loader.ts index ef04a7a..8294cea 100644 --- a/packages/document-loaders/src/utils/pdf/loader.ts +++ b/packages/document-loaders/src/utils/pdf/loader.ts @@ -4,6 +4,7 @@ import { orderBy } from 'lodash'; import { getLinkBoundingBoxes, PdfLinkBoundingBox } from './links.js'; import { boundingBoxesOverlap, expandBoundingBox } from './bounding-box.js'; +// Makes parser available in bundle when document-loaders are used as dependency pdfjs.GlobalWorkerOptions.workerSrc = require.resolve('pdfjs-dist/build/pdf.worker.min.js'); export async function loadPdfContentFromBuffer(buffer: ArrayBuffer): Promise {