KEMBAR78
fix: use globalThis instead of self to address non Browser consumption by alan-agius4 · Pull Request #4856 · xtermjs/xterm.js · GitHub
Skip to content

Conversation

@alan-agius4
Copy link
Contributor

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
Screenshot 2023-10-30 at 10 44 02

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
@Tyriar Tyriar added this to the 5.4.0 milestone Oct 30, 2023
@Tyriar Tyriar self-assigned this Oct 30, 2023
@Tyriar Tyriar enabled auto-merge October 30, 2023 16:29
@Tyriar Tyriar merged commit 804ff18 into xtermjs:master Oct 30, 2023
@alan-agius4 alan-agius4 deleted the alan-agius4-patch-1 branch October 30, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants