I'm trying to write a userscript using TamperMonkey on Chrome.

I want to use https://github.com/Fil/d3-geo-voronoi so I put this in my script header:

// @require        https://cdn.jsdelivr.net/npm/d3@7.0.0/dist/d3.min.js
// @require        https://cdn.jsdelivr.net/npm/d3-delaunay@6.0.2/dist/d3-delaunay.min.js
// @require        https://cdn.jsdelivr.net/npm/d3-geo-voronoi@1.6.0/dist/d3-geo-voronoi.min.js

d3 and d3-delaunay are imported correctly but for some reason, d3-geo-voronoi is not. I can see in the chrome dev tools sources tab that the script has been included but the Chrome dev tools console shows that d3.geoVoronoi is not defined.

If I copy and paste the contents of https://cdn.jsdelivr.net/npm/d3-geo-voronoi@1.6.0/dist/d3-geo-voronoi.min.js into the console, d3.geoVoronoi is defined and works as I would expect.

Any idea what I'm doing wrong?

Re: @birkett83:

Try it without the minification routines i.e.

// @require        https://cdn.jsdelivr.net/npm/d3@7.0.0/dist/d3.js
// @require        https://cdn.jsdelivr.net/npm/d3-delaunay@6.0.2/dist/d3-delaunay.js
// @require        https://cdn.jsdelivr.net/npm/d3-geo-voronoi@1.6.0/dist/d3-geo-voronoi.js

Your version of Tampermonkey (TM) may be utilizing SRI and the jsdelivr server might not be well tweaked for that just yet or vice versa.

In any case TM issues is where you might get more in-depth answers for that .user.js engine.