-
Notifications
You must be signed in to change notification settings - Fork 353
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
AMD compatibility broken in 1.8.1. #130
Comments
I see you’re already using Rollup for 2.0.0, hooray! So feel free to close this if you don’t feel a need to ship a patch release for v1. 😄 |
mdaines
added a commit
that referenced
this issue
May 4, 2018
Thanks a lot. Here is evidence that it's working: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Viz.js 1.8.1 adds a new UMD block that 1.8.0 didn’t have:
But Viz.js 1.8.1 retains the global / CommonJS export block from previous releases:
As a result, in an AMD environment (such as when using d3-require inside of Observable), loading Viz.js 1.8.1 returns the
Module
object (created by Emscripten?) rather than the expectedViz
object.Replacing both blocks with something like this should work:
(I often use Rollup to generate UMD bundles from ES modules; see @observablehq/graphviz for an example.)
The text was updated successfully, but these errors were encountered: