1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Remove most build-time require-calls from the src/display/-folder

By leveraging import maps we can get rid of *most* of the remaining `require`-calls in the `src/display/`-folder, since we should strive to use modern `import`-statements wherever possible.
The only remaining cases are Node.js-specific dependencies, since those seem very difficult to convert unless we start producing a bundle *specifically* for Node.js environments.
This commit is contained in:
Jonas Jenwald 2023-07-13 11:58:16 +02:00
parent e81c084a92
commit d022912719
11 changed files with 122 additions and 54 deletions

View file

@ -49,6 +49,13 @@ See https://github.com/adobe-type-tools/cmap-resources
"pdfjs-lib": "../src/pdf.js",
"pdfjs-web/": "./",
"display-fetch_stream": "../src/display/fetch_stream.js",
"display-l10n_utils": "../src/display/stubs.js",
"display-network": "../src/display/network.js",
"display-node_stream": "../src/display/stubs.js",
"display-node_utils": "../src/display/stubs.js",
"display-svg": "../src/display/stubs.js",
"web-annotation_editor_params": "./stubs-geckoview.js",
"web-com": "./genericcom.js",
"web-pdf_attachment_viewer": "./stubs-geckoview.js",

View file

@ -60,6 +60,13 @@ See https://github.com/adobe-type-tools/cmap-resources
"pdfjs-lib": "../src/pdf.js",
"pdfjs-web/": "./",
"display-fetch_stream": "../src/display/fetch_stream.js",
"display-l10n_utils": "../src/display/stubs.js",
"display-network": "../src/display/network.js",
"display-node_stream": "../src/display/stubs.js",
"display-node_utils": "../src/display/stubs.js",
"display-svg": "../src/display/stubs.js",
"web-annotation_editor_params": "./annotation_editor_params.js",
"web-com": "./genericcom.js",
"web-pdf_attachment_viewer": "./pdf_attachment_viewer.js",