Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add globalObject: 'this' option to webpack config #963

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grhbit
Copy link

@grhbit grhbit commented May 9, 2020

This PR fixes an error typeof window is not defined in node env.

It fixes #920 and #893

UMD module spec has root object.

Both node and browser have respective own root, global, window. And we can access their root by this in global execution context.

So, this pr sets root object to this not window.

FYI: webpack/webpack#6642 (comment)

fix error `typeof window is not defined` in SSR
@grhbit
Copy link
Author

grhbit commented May 9, 2020

And some dependencies has same issue.

  • draftjs-utils
  • html-to-draftjs

That packages also need same changes.

@dvargas92495
Copy link

Any update on this? Just ran into the referenced issue

@qweluke
Copy link

qweluke commented Dec 21, 2021

@jpuri any update on 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.

After updating to the latest verion of react-draft-wysiwyg 1.14.4 [ReferenceError: window is not defined]
3 participants