mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Remove the createDownloadManager
method from DefaultExternalServices
Given the simplicity of the `createDownloadManager` method, we can leverage import maps to directly initialize the correct `DownloadManager`-instance depending on the build.
This commit is contained in:
parent
d8f77e6b84
commit
1698991ae2
8 changed files with 9 additions and 20 deletions
|
@ -270,6 +270,7 @@ function createWebpackConfig(
|
|||
"web-alt_text_manager": "web/alt_text_manager.js",
|
||||
"web-annotation_editor_params": "web/annotation_editor_params.js",
|
||||
"web-com": "",
|
||||
"web-download_manager": "",
|
||||
"web-l10n_utils": "web/stubs.js",
|
||||
"web-pdf_attachment_viewer": "web/pdf_attachment_viewer.js",
|
||||
"web-pdf_cursor_tools": "web/pdf_cursor_tools.js",
|
||||
|
@ -289,6 +290,7 @@ function createWebpackConfig(
|
|||
libraryAlias["display-network"] = "src/display/network.js";
|
||||
|
||||
viewerAlias["web-com"] = "web/chromecom.js";
|
||||
viewerAlias["web-download_manager"] = "web/download_manager.js";
|
||||
viewerAlias["web-print_service"] = "web/pdf_print_service.js";
|
||||
} else if (bundleDefines.GENERIC) {
|
||||
// Aliases defined here must also be replicated in the paths section of
|
||||
|
@ -300,6 +302,7 @@ function createWebpackConfig(
|
|||
libraryAlias["display-node_utils"] = "src/display/node_utils.js";
|
||||
|
||||
viewerAlias["web-com"] = "web/genericcom.js";
|
||||
viewerAlias["web-download_manager"] = "web/download_manager.js";
|
||||
viewerAlias["web-l10n_utils"] = "web/l10n_utils.js";
|
||||
viewerAlias["web-print_service"] = "web/pdf_print_service.js";
|
||||
} else if (bundleDefines.MOZCENTRAL) {
|
||||
|
@ -313,6 +316,7 @@ function createWebpackConfig(
|
|||
}
|
||||
}
|
||||
viewerAlias["web-com"] = "web/firefoxcom.js";
|
||||
viewerAlias["web-download_manager"] = "web/firefoxcom.js";
|
||||
viewerAlias["web-print_service"] = "web/firefox_print_service.js";
|
||||
}
|
||||
const alias = { ...basicAlias, ...libraryAlias, ...viewerAlias };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue