From 10932e3f9d38d5c41cc2bd872779fcff79416b5b Mon Sep 17 00:00:00 2001 From: Takashi Tamura Date: Sat, 14 May 2022 17:02:06 +0900 Subject: [PATCH] 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 --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index f40f1771a91ee..ffc508355cada 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -230,7 +230,7 @@ function createWebpackConfig( } // Required to expose e.g., the `window` object. - output.globalObject = "this"; + output.globalObject = "globalThis"; return { mode: "none",