-
Notifications
You must be signed in to change notification settings - Fork 146
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
Stop using XMLHttpRequest? Use an alternative? #157
Comments
@bjonnh Thanks for reaching out. The benefit of being isomorphic comes with a little bit of complexity -- when you're packaging up rdflib for use in the browser, you have to remember to exclude the That means, if you're using Browserify, you have to add And if you're using Webpack (which is what I assume you're using with react), you have to add XMLHttpRequest to your module.exports = {
// ... other stuff
externals: {
'xmlhttprequest': 'XMLHttpRequest'
}
} (This tells Webpack to /not/ webpack the I'm going to close this issue; please feel free to reopen if you have further questions. |
I should clarify - it's specifically the |
Thanks for reaching out so quickly, I'll try to find a way to exclude that in my react app. |
I tried to use rdflib.js with react, but it fails due to XMLHttpRequest requiring child_process.
Is there a plan to remove that dependency, or should I just fork it?
The text was updated successfully, but these errors were encountered: