You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we import using CommonJS syntax: const whatever = require('whatever');. This actually creates issues in some cases for consumers of stardog.js who also use webpack, since one of our transitive dependencies (node-fetch) uses ES modules, and webpack prefers ES modules when they're available, with the result that our require imports an object with a default property if stardog.js gets bundled by webpack (see this issue and especially this comment, as well as this issue. There are workarounds, but they're inconvenient, and there's probably no other compelling reason not to just use import anyway, so we should consider switching over for v2.
The text was updated successfully, but these errors were encountered:
Currently, we import using CommonJS syntax:
const whatever = require('whatever');
. This actually creates issues in some cases for consumers of stardog.js who also use webpack, since one of our transitive dependencies (node-fetch
) uses ES modules, and webpack prefers ES modules when they're available, with the result that ourrequire
imports an object with adefault
property if stardog.js gets bundled by webpack (see this issue and especially this comment, as well as this issue. There are workarounds, but they're inconvenient, and there's probably no other compelling reason not to just useimport
anyway, so we should consider switching over for v2.The text was updated successfully, but these errors were encountered: