How to load experimental versions of libraries?

Spawned from "global is undefined" when using viz.js through d3-graphviz 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.

this works for me in Chrome:


1 Like

I didn’t (/don’t) really understand how require works either. Check out my notes on requiring a random js file from the web:


@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.

Replacing localhost with made it work:
d3_graphviz = require(“”)

See the note at the bottom of

1 Like