Use globalThis for webpack's output.globalObject instead of this. Close #14915.
That allows us to import pdfjs-dist/build/pdf.js dynamically from modules. - https://webpack.js.org/configuration/output/#outputglobalobject - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
This commit is contained in:
parent
9bdf27e8e0
commit
10932e3f9d
@ -230,7 +230,7 @@ function createWebpackConfig(
|
||||
}
|
||||
|
||||
// Required to expose e.g., the `window` object.
|
||||
output.globalObject = "this";
|
||||
output.globalObject = "globalThis";
|
||||
|
||||
return {
|
||||
mode: "none",
|
||||
|
Loading…
Reference in New Issue
Block a user