mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Remove the require
from the web/pdfjs.js
Having a `require` in this file has never made sense in e.g. the Firefox PDF Viewer and shouldn't really be necessary. Possibly the idea was to facilitate some kind of third-party bundling, however the *built* `pdf.js` file has always exposed the API-contents globally.
This commit is contained in:
parent
86a868189c
commit
bad4bfffdf
1 changed files with 2 additions and 8 deletions
10
web/pdfjs.js
10
web/pdfjs.js
|
@ -12,14 +12,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals module, __non_webpack_require__ */
|
||||
/* globals module */
|
||||
|
||||
"use strict";
|
||||
|
||||
let pdfjsLib;
|
||||
if (typeof window !== "undefined" && window["pdfjs-dist/build/pdf"]) {
|
||||
pdfjsLib = window["pdfjs-dist/build/pdf"];
|
||||
} else {
|
||||
pdfjsLib = __non_webpack_require__("../build/pdf.js");
|
||||
}
|
||||
module.exports = pdfjsLib;
|
||||
module.exports = globalThis.pdfjsLib;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue