Skip to content

Commit

Permalink
Revert "Import pdfjs-dist directly"
Browse files Browse the repository at this point in the history
This reverts commit ac85a4e.
  • Loading branch information
wojtekmaj committed Apr 17, 2023
1 parent 71d108a commit 9243e45
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import makeCancellable from 'make-cancellable-promise';
import clsx from 'clsx';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import DocumentContext from './DocumentContext';

Expand Down
2 changes: 1 addition & 1 deletion src/Page/AnnotationLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useContext, useEffect, useMemo, useRef } from 'react';
import makeCancellable from 'make-cancellable-promise';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import DocumentContext from '../DocumentContext';
import PageContext from '../PageContext';
Expand Down
2 changes: 1 addition & 1 deletion src/Page/PageCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useCallback, useContext, useEffect, useMemo, useRef } from 'reac
import mergeRefs from 'merge-refs';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import PageContext from '../PageContext';

Expand Down
2 changes: 1 addition & 1 deletion src/Page/PageSVG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useContext, useEffect, useMemo } from 'react';
import makeCancellable from 'make-cancellable-promise';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import PageContext from '../PageContext';

Expand Down
2 changes: 1 addition & 1 deletion src/Page/TextLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useCallback, useContext, useEffect, useLayoutEffect, useMemo, us
import makeCancellable from 'make-cancellable-promise';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import PageContext from '../PageContext';

Expand Down
2 changes: 1 addition & 1 deletion src/index.parcel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import Document from './Document';
import Outline from './Outline';
Expand Down
2 changes: 1 addition & 1 deletion src/index.parcel2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import Document from './Document';
import Outline from './Outline';
Expand Down
2 changes: 1 addition & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import Document from './Document';
import Outline from './Outline';
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import Document from './Document';
import Outline from './Outline';
Expand Down
2 changes: 1 addition & 1 deletion src/index.vite.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import Document from './Document';
import Outline from './Outline';
Expand Down
2 changes: 1 addition & 1 deletion src/index.webpack.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/ban-ts-comment, import/no-unresolved */
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';
// @ts-ignore-next-line
import pdfjsWorker from 'file-loader!pdfjs-dist/build/pdf.worker';

Expand Down
2 changes: 1 addition & 1 deletion src/index.webpack5.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist';

import Document from './Document';
import Outline from './Outline';
Expand Down

0 comments on commit 9243e45

Please sign in to comment.