mirror of
https://github.com/xtermjs/xterm.js.git
synced 2026-02-01 16:48:16 +00:00
fix: use globalThis instead of self to address non Browser consumption
Currently using this package in a non Browser env will cause an error as Webpack will emit `self` which does not exist in all envs such as Node.js and Workers. This commit updates Webpack and force it to use `globalThis`. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
This commit is contained in:
parent
9fff1e6e44
commit
de1304d19e
@ -39,8 +39,10 @@ const config = {
|
||||
output: {
|
||||
filename: 'xterm.js',
|
||||
path: path.resolve('./lib'),
|
||||
libraryTarget: 'umd'
|
||||
libraryTarget: 'umd',
|
||||
// Force usage of globalThis instead of global / self. (This is cross-env compatible)
|
||||
globalObject: 'globalThis',
|
||||
},
|
||||
mode: 'production'
|
||||
mode: 'production',
|
||||
};
|
||||
module.exports = config;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user