Importing D3plus using require()

Hello everyone,

I’m wondering if it’s possible to import the D3plus library using the require() function?

My code "d3plus = require('d3plus')" , returns this error message: “RequireError: unable to load module.”

Thank you in advance! :blush:

At a quick glance it looks like the AMD build (which d3-require is for) might actually handle CommonJS.

In any case, these days most packages support ES imports:

d3plus = import("https://esm.run/d3plus")

Thank you very much for the response! Yesterday, I tried in several different ways without success! Thanks again!

1 Like