mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
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
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ function createWebpackConfig(
|
|||
}
|
||||
|
||||
// Required to expose e.g., the `window` object.
|
||||
output.globalObject = "this";
|
||||
output.globalObject = "globalThis";
|
||||
|
||||
return {
|
||||
mode: "none",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue