Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pdfjs-dist build with legacy ES5 version #794

Merged
merged 5 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,336 changes: 6,336 additions & 0 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Document.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
import makeEventProps from 'make-event-props';
import makeCancellable from 'make-cancellable-promise';
import mergeClassNames from 'merge-class-names';
import * as pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist/es5/build/pdf';

import DocumentContext from './DocumentContext';

Expand Down
2 changes: 1 addition & 1 deletion src/Page/AnnotationLayer.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import * as pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist/es5/build/pdf';
import makeCancellable from 'make-cancellable-promise';

import DocumentContext from '../DocumentContext';
Expand Down
2 changes: 1 addition & 1 deletion src/Page/PageSVG.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import * as pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist/es5/build/pdf';

import PageContext from '../PageContext';

Expand Down
2 changes: 1 addition & 1 deletion src/entry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist/es5/build/pdf';

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

import Document from './Document';
import Outline from './Outline';
Expand Down
4 changes: 2 additions & 2 deletions src/entry.webpack.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as pdfjs from 'pdfjs-dist';
import * as pdfjs from 'pdfjs-dist/es5/build/pdf';
// eslint-disable-next-line
import pdfjsWorker from 'file-loader!pdfjs-dist/build/pdf.worker';
import pdfjsWorker from 'file-loader!pdfjs-dist/es5/build/pdf.worker';

import Document from './Document';
import Outline from './Outline';
Expand Down
2 changes: 1 addition & 1 deletion src/pdf.worker.entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* See: https://github.com/parcel-bundler/parcel/issues/670
*/

(typeof window !== 'undefined' ? window : {}).pdfjsWorker = require('pdfjs-dist/build/pdf.worker.js');
(typeof window !== 'undefined' ? window : {}).pdfjsWorker = require('pdfjs-dist/es5/build/pdf.worker');