Comment

Comment by simonw

I built a tool relevant to this the other day. I was fed up of how hard it was to download ES modules from a CDN and store them locally so I could build apps without that CDN dependency, so I made this:

    pip install download-esm
    download-esm @observablehq/plot
This downloads the ESM version of Observable Plot from the jsDelivr CDN, figures out its dependencies, downloads them as well (40 files total!) and rewrites their imports to be local, not CDN paths.

More details here: https://simonwillison.net/2023/May/2/download-esm/

I'm now considering adding import maps support: https://github.com/simonw/download-esm/issues/4

parent simonw 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton