-
Notifications
You must be signed in to change notification settings - Fork 21
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
[WIP] Make the new module system in rdflib work #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be able to import * as $rdf, { NamedNode }
, or might want to const { NamedNode } = $rdf
.
Question is whether you really want to import * as $rdf
instead of importing only the parts you need. And you probably do not want to import NamedNode
, but rather import DataFactory
and use its .namedNode
method.
This breaking change is why I strongly suggest to remove rdflib 1.0.{1,2}. |
Right now it seems that there are code in solid-ui that are dependent on $rdf being in the global object |
Needs an |
Updated to rdflib@1.0.3 in latest commit |
@@ -1,8 +1,9 @@ | |||
import $rdf, { NamedNode } from 'rdflib' | |||
import * as $rdf from 'rdflib' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would indeed be clearer if this would be import * as $rdf, { NamedNode } from 'rdflib'
I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to work when I build it and run it.
The new 1.0.3. + rdflib is supposed to be basically compatible, so long as you don't use default imports.
This should only be merged after linkeddata/rdflib.js#335 is merged and pushed into a new version.
Not 100% sure why this works, but seems to do the trick on my local setup.Right, @RubenVerborgh already explained this in his comment linkeddata/rdflib.js#335 (comment)