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

require DOMParser so it doesn't throw an error #16

Closed
wants to merge 1 commit into from

Conversation

x5engine
Copy link

@x5engine x5engine commented Feb 8, 2017

Require DOMParser so it doesn't throw a server error for SSR or if used only the server!

Require DOMParser so it doesn't throw a server error for SSR or if used only the server!
@sstur sstur closed this Sep 4, 2017
@x5engine
Copy link
Author

x5engine commented Sep 4, 2017

@sstur bro why? say something

@sstur
Copy link
Owner

sstur commented Sep 5, 2017

Sorry, I should have explained it. This will not work on browser-side because it uses require('dom-parser') which is a module that is not listed in package.json. The correct fix for this issue is using some feature detection and loading the module only for SSR which I'm hesitant to do if it makes our package larger for web deployments.

I've opened a new issue over at sstur/draft-js-utils#92 which is the new home for this repo.

Hope that is clearer.

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.

None yet

3 participants