From 815758529d6d4ad34164b942e03de349a13d8a16 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:21:30 -0600 Subject: [PATCH 01/15] Update global object fix --- addons/addon-attach/webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/addon-attach/webpack.config.js b/addons/addon-attach/webpack.config.js index 599bb14204..a882928b06 100644 --- a/addons/addon-attach/webpack.config.js +++ b/addons/addon-attach/webpack.config.js @@ -26,6 +26,8 @@ module.exports = { path: path.resolve('./lib'), library: addonName, libraryTarget: 'umd' + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From 7f7de14e6f3e17b0ab7ecf77a1c1a0242e0b5d42 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:23:33 -0600 Subject: [PATCH 02/15] Add comma --- addons/addon-attach/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/addon-attach/webpack.config.js b/addons/addon-attach/webpack.config.js index a882928b06..3599a977fa 100644 --- a/addons/addon-attach/webpack.config.js +++ b/addons/addon-attach/webpack.config.js @@ -25,7 +25,7 @@ module.exports = { filename: mainFile, path: path.resolve('./lib'), library: addonName, - libraryTarget: 'umd' + libraryTarget: 'umd', // Force usage of globalThis instead of global / self. (This is cross-env compatible) globalObject: 'globalThis', }, From 1a67241f67f68831e487c75cfe76ae65326362d9 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:23:57 -0600 Subject: [PATCH 03/15] Update global object fix --- addons/addon-canvas/webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/addon-canvas/webpack.config.js b/addons/addon-canvas/webpack.config.js index 9daa08f9b2..e0c7fde2f3 100644 --- a/addons/addon-canvas/webpack.config.js +++ b/addons/addon-canvas/webpack.config.js @@ -33,7 +33,9 @@ module.exports = { filename: mainFile, path: path.resolve('./lib'), library: addonName, - libraryTarget: 'umd' + libraryTarget: 'umd', + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From f84fff5f873b44438115183d8058b66bf2bdc867 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:24:15 -0600 Subject: [PATCH 04/15] Update global object fix --- addons/addon-fit/webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/addon-fit/webpack.config.js b/addons/addon-fit/webpack.config.js index e220668c74..aebb523a6b 100644 --- a/addons/addon-fit/webpack.config.js +++ b/addons/addon-fit/webpack.config.js @@ -25,7 +25,9 @@ module.exports = { filename: mainFile, path: path.resolve('./lib'), library: addonName, - libraryTarget: 'umd' + libraryTarget: 'umd', + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From 8d6fff7000158cc3f118b921f4814b0eda1b17f9 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:27:44 -0600 Subject: [PATCH 05/15] Update webpack.config.js global object fix --- addons/addon-image/webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/addon-image/webpack.config.js b/addons/addon-image/webpack.config.js index b4283b66e3..239ebd245c 100644 --- a/addons/addon-image/webpack.config.js +++ b/addons/addon-image/webpack.config.js @@ -33,7 +33,9 @@ const addon = { filename: mainFile, path: path.resolve('./lib'), library: addonName, - libraryTarget: 'umd' + libraryTarget: 'umd', + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From 46baff84593bbc3c2854f4743a45e5057e9ccfa8 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:28:05 -0600 Subject: [PATCH 06/15] Update webpack.config.js global object fix --- addons/addon-ligatures/webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/addon-ligatures/webpack.config.js b/addons/addon-ligatures/webpack.config.js index 6ec7f42d02..f9e9f34784 100644 --- a/addons/addon-ligatures/webpack.config.js +++ b/addons/addon-ligatures/webpack.config.js @@ -25,7 +25,9 @@ module.exports = { filename: mainFile, path: path.resolve('./lib'), library: addonName, - libraryTarget: 'umd' + libraryTarget: 'umd', + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production', externals: { From 072cd029e424891f34c109a17b7c8c127763f8ef Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:28:21 -0600 Subject: [PATCH 07/15] Update webpack.config.js global object fix --- addons/addon-search/webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/addon-search/webpack.config.js b/addons/addon-search/webpack.config.js index a770f93f50..7858054871 100644 --- a/addons/addon-search/webpack.config.js +++ b/addons/addon-search/webpack.config.js @@ -32,7 +32,9 @@ module.exports = { filename: mainFile, path: path.resolve('./lib'), library: addonName, - libraryTarget: 'umd' + libraryTarget: 'umd', + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From d8f96ab9c744032f6f6deb91dc5fe4c8ce9e5a32 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:29:20 -0600 Subject: [PATCH 08/15] Update webpack.config.js global object fix `this` might be okay, I'm not actually sure, but xterm.js uses `globalThis` and so I think consistency is better maybe? --- addons/addon-serialize/webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/addon-serialize/webpack.config.js b/addons/addon-serialize/webpack.config.js index bd08ca3745..837a73a388 100644 --- a/addons/addon-serialize/webpack.config.js +++ b/addons/addon-serialize/webpack.config.js @@ -34,7 +34,8 @@ module.exports = { path: path.resolve('./lib'), library: addonName, libraryTarget: 'umd', - globalObject: 'this' + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From 330d7b3100c79bc5f890ca0c28bfef67d55db33c Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:29:33 -0600 Subject: [PATCH 09/15] Update webpack.config.js global object fix --- addons/addon-unicode-graphemes/webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/addon-unicode-graphemes/webpack.config.js b/addons/addon-unicode-graphemes/webpack.config.js index 6a80bdea60..1ebaecaab1 100644 --- a/addons/addon-unicode-graphemes/webpack.config.js +++ b/addons/addon-unicode-graphemes/webpack.config.js @@ -32,7 +32,9 @@ module.exports = { filename: mainFile, path: path.resolve('./lib'), library: addonName, - libraryTarget: 'umd' + libraryTarget: 'umd', + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From 693ec1b2bcaae2f05496f4a696ec39997230cdeb Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:29:48 -0600 Subject: [PATCH 10/15] Update webpack.config.js global object fix --- addons/addon-unicode11/webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/addon-unicode11/webpack.config.js b/addons/addon-unicode11/webpack.config.js index 1913481d2c..746d25819b 100644 --- a/addons/addon-unicode11/webpack.config.js +++ b/addons/addon-unicode11/webpack.config.js @@ -33,7 +33,8 @@ module.exports = { path: path.resolve('./lib'), library: addonName, libraryTarget: 'umd', - globalObject: 'this' + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From 8696cf8789575cfabb1b9b364b6b3c1a085e848d Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:29:59 -0600 Subject: [PATCH 11/15] Update webpack.config.js global object fix --- addons/addon-web-links/webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/addon-web-links/webpack.config.js b/addons/addon-web-links/webpack.config.js index 4484dbf604..e8dceceff0 100644 --- a/addons/addon-web-links/webpack.config.js +++ b/addons/addon-web-links/webpack.config.js @@ -25,7 +25,9 @@ module.exports = { filename: mainFile, path: path.resolve('./lib'), library: addonName, - libraryTarget: 'umd' + libraryTarget: 'umd', + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From c0044dc4a5f07d04d1da1b0346bdef09869fabd5 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:30:10 -0600 Subject: [PATCH 12/15] Update webpack.config.js global object fix --- addons/addon-webgl/webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/addon-webgl/webpack.config.js b/addons/addon-webgl/webpack.config.js index f31ffd513e..7365acff01 100644 --- a/addons/addon-webgl/webpack.config.js +++ b/addons/addon-webgl/webpack.config.js @@ -33,7 +33,9 @@ module.exports = { filename: mainFile, path: path.resolve('./lib'), library: addonName, - libraryTarget: 'umd' + libraryTarget: 'umd', + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, mode: 'production' }; From d5827ec77d044af9f8cc3e8719710fb93bd1abb4 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 19:54:27 -0600 Subject: [PATCH 13/15] Update webpack.config.headless.js --- webpack.config.headless.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webpack.config.headless.js b/webpack.config.headless.js index 9e9099cdd8..12e7484d7e 100644 --- a/webpack.config.headless.js +++ b/webpack.config.headless.js @@ -39,8 +39,10 @@ const config = { path: path.resolve('./headless/lib-headless'), library: { type: 'commonjs' - } + }, + // Force usage of globalThis instead of global / self. (This is cross-env compatible) + globalObject: 'globalThis', }, - mode: 'production' + mode: 'production', }; module.exports = config; From 67e8e60a6990621ba32b3ee12f89395a070dd495 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 19:55:18 -0600 Subject: [PATCH 14/15] Update webpack.config.headless.js --- webpack.config.headless.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.headless.js b/webpack.config.headless.js index 12e7484d7e..5c8deb160d 100644 --- a/webpack.config.headless.js +++ b/webpack.config.headless.js @@ -43,6 +43,6 @@ const config = { // Force usage of globalThis instead of global / self. (This is cross-env compatible) globalObject: 'globalThis', }, - mode: 'production', + mode: 'production' }; module.exports = config; From d83f442cffc30ecfe4874c0ce27f817451df8262 Mon Sep 17 00:00:00 2001 From: octoclonius <25781800+octoclonius@users.noreply.github.com> Date: Sat, 13 Jan 2024 19:57:38 -0600 Subject: [PATCH 15/15] Update webpack.config.headless.js --- webpack.config.headless.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.headless.js b/webpack.config.headless.js index 5c8deb160d..12e7484d7e 100644 --- a/webpack.config.headless.js +++ b/webpack.config.headless.js @@ -43,6 +43,6 @@ const config = { // Force usage of globalThis instead of global / self. (This is cross-env compatible) globalObject: 'globalThis', }, - mode: 'production' + mode: 'production', }; module.exports = config;