Actually limit SVGGraphics
to GENERIC builds (PR 16226 follow-up)
After PR 16226 the deprecated SVG back-end is now unused in development mode, with the exception of unit-tests, hence we can re-factor how it's exposed in the API to avoid including a useless webpack-closure in e.g. the *built-in* Firefox PDF Viewer.
This commit is contained in:
parent
a8d4aad8b9
commit
89f29192a5
3245
src/display/svg.js
3245
src/display/svg.js
File diff suppressed because it is too large
Load Diff
@ -69,7 +69,6 @@ import { AnnotationEditorLayer } from "./display/editor/annotation_editor_layer.
|
|||||||
import { AnnotationEditorUIManager } from "./display/editor/tools.js";
|
import { AnnotationEditorUIManager } from "./display/editor/tools.js";
|
||||||
import { AnnotationLayer } from "./display/annotation_layer.js";
|
import { AnnotationLayer } from "./display/annotation_layer.js";
|
||||||
import { GlobalWorkerOptions } from "./display/worker_options.js";
|
import { GlobalWorkerOptions } from "./display/worker_options.js";
|
||||||
import { SVGGraphics } from "./display/svg.js";
|
|
||||||
import { XfaLayer } from "./display/xfa_layer.js";
|
import { XfaLayer } from "./display/xfa_layer.js";
|
||||||
|
|
||||||
/* eslint-disable-next-line no-unused-vars */
|
/* eslint-disable-next-line no-unused-vars */
|
||||||
@ -79,6 +78,11 @@ const pdfjsVersion =
|
|||||||
const pdfjsBuild =
|
const pdfjsBuild =
|
||||||
typeof PDFJSDev !== "undefined" ? PDFJSDev.eval("BUNDLE_BUILD") : void 0;
|
typeof PDFJSDev !== "undefined" ? PDFJSDev.eval("BUNDLE_BUILD") : void 0;
|
||||||
|
|
||||||
|
const SVGGraphics =
|
||||||
|
typeof PDFJSDev !== "undefined" && PDFJSDev.test("GENERIC")
|
||||||
|
? require("./display/svg.js").SVGGraphics
|
||||||
|
: null;
|
||||||
|
|
||||||
export {
|
export {
|
||||||
AbortException,
|
AbortException,
|
||||||
AnnotationEditorLayer,
|
AnnotationEditorLayer,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user