Skip to content

Commit

Permalink
Fix Vite specific entry causing fake worker to be initialized
Browse files Browse the repository at this point in the history
Closes #1148
  • Loading branch information
wojtekmaj committed Nov 9, 2022
1 parent 49994e6 commit b4e9fe2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/entry.vite.js
@@ -1,6 +1,4 @@
import * as pdfjs from 'pdfjs-dist/build/pdf';
// eslint-disable-next-line import/no-unresolved
import pdfjsWorker from './pdf.worker.entry?url';

import Document from './Document';
import Outline from './Outline';
Expand All @@ -10,6 +8,6 @@ import { displayWorkerWarning } from './shared/utils';

displayWorkerWarning();

pdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker;
pdfjs.GlobalWorkerOptions.workerSrc = new URL('pdfjs-dist/build/pdf.worker.js', import.meta.url);

export { pdfjs, Document, Outline, Page };

0 comments on commit b4e9fe2

Please sign in to comment.