Skip to content

Add globalObject option to webpack.config.js #2

Open
rsekijima wants to merge 1 commit intoMoebiusSolutions:mainfrom
gohypergiant:fix/reference-error
Open

Add globalObject option to webpack.config.js #2
rsekijima wants to merge 1 commit intoMoebiusSolutions:mainfrom
gohypergiant:fix/reference-error

Conversation

@rsekijima
Copy link

Description:

This PR addresses a runtime error occurring when importing the package. The error, "ReferenceError: self is not defined," is encountered due to the absence of the globalObject configuration in the webpack setup. The addition of globalObject: 'this' to the webpack configuration ensures proper execution without encountering this error.

Issue:

Attempting to import the package into a React project leads to a runtime error: "ReferenceError: self is not defined" (located at /app/node_modules/@moesol/inter-widget-communication/build/index.js:1:256).

image

Changes Made:

Added globalObject: 'this' to the webpack configuration (webpack.config.js). This will change references from self to this.

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.

1 participant