Spawned from "global is undefined" when using viz.js through d3-graphviz
https://github.com/observablehq/notebook-stdlib#require says “loaded from unpkg”. Is this the only way?
It would be useful to be able to load libraries from anywhere, e.g. a local web server.
Fil
2
this works for me in Chrome:
require("http://localhost/d3/d3-geo-projection/build/d3-geo-projection.js")
1 Like
sorig
3
I didn’t (/don’t) really understand how require works either. Check out my notes on requiring a random js file from the web: https://beta.observablehq.com/@sorig/how-to-require-stubborn-modules-a-case-study
2 Likes
@Fil: This gives me Error: unable to load module:
d3_graphviz = require(“http://localhost:8080/build/d3-graphviz.js”)
@sorig: Thanks. I will dig into your notes.