Skip to content

Commit

Permalink
engine: build the UMD module with a globalObject of this
Browse files Browse the repository at this point in the history
The Webpack default is `self` but as far as I can tell, `this` is
preferable:

https://webpack.js.org/configuration/output/#outputglobalobject
https://stackoverflow.com/questions/64639839/typescript-webpack-library-generates-referenceerror-self-is-not-defined

This fixes a problem with testing/running the Constellations frontend
with the latest version of the engine.
  • Loading branch information
pkgw committed Nov 6, 2023
1 parent 252f582 commit 1dce654
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions engine/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var config = {
entry: "./esm/index.js",
output: {
path: path.resolve(__dirname, "src"),
globalObject: "this",
library: {
name: "wwtlib",
type: "umd"
Expand Down

0 comments on commit 1dce654

Please sign in to comment.