CDN es6 module import requires importmap (Vanilla JS)

There’s UMD-Version of three.js (V.161) - #5 by PavelBoytchev, perhaps. For a transition period three.js was maintaining builds of each individual examples/jsm import in both ESM and UMD/global versions, but that was not practical as a permanent solution.

But I wonder a switch/variable that set all relative links to absolute URLS would have been cool?

AFAIK import maps are the closest thing the JavaScript language allows. Or you could do this with a tool, but, then that’s a bundler if you squint.

(I mostly use Vite)

1 Like