Skip to content

Commit

Permalink
Merge pull request #4940 from octoclonius/patch-1
Browse files Browse the repository at this point in the history
Update global object fix
  • Loading branch information
Tyriar committed Apr 21, 2024
2 parents f1bb8f4 + ce3e085 commit 6be1c3f
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 13 deletions.
4 changes: 3 additions & 1 deletion addons/addon-attach/webpack.config.js
Expand Up @@ -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'
};
4 changes: 3 additions & 1 deletion addons/addon-canvas/webpack.config.js
Expand Up @@ -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'
};
4 changes: 3 additions & 1 deletion addons/addon-fit/webpack.config.js
Expand Up @@ -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'
};
4 changes: 3 additions & 1 deletion addons/addon-image/webpack.config.js
Expand Up @@ -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'
};
Expand Down
4 changes: 3 additions & 1 deletion addons/addon-ligatures/webpack.config.js
Expand Up @@ -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: {
Expand Down
4 changes: 3 additions & 1 deletion addons/addon-search/webpack.config.js
Expand Up @@ -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'
};
3 changes: 2 additions & 1 deletion addons/addon-serialize/webpack.config.js
Expand Up @@ -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'
};
4 changes: 3 additions & 1 deletion addons/addon-unicode-graphemes/webpack.config.js
Expand Up @@ -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'
};
3 changes: 2 additions & 1 deletion addons/addon-unicode11/webpack.config.js
Expand Up @@ -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'
};
4 changes: 3 additions & 1 deletion addons/addon-web-links/webpack.config.js
Expand Up @@ -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'
};
4 changes: 3 additions & 1 deletion addons/addon-webgl/webpack.config.js
Expand Up @@ -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'
};
6 changes: 4 additions & 2 deletions webpack.config.headless.js
Expand Up @@ -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;

0 comments on commit 6be1c3f

Please sign in to comment.