April 20, 2026

before today, ./plan1.sh serve served client/public/ directly. esm.sh urls in the importmap. hit a cdn every page load. works fine until it doesn't.

now there's a dist folder. ./plan1.sh build runs two qjs scripts: build.js generates the html from blog posts and sagas. vendor.js copies the whole source tree to dist, then walks every index.html, finds the importmap, and downloads every esm.sh url to dist/vendor/deps/. it rewrites the importmap in-place. deps get served locally. no cdn.

the caching is file-based. os.stat checks if the file exists before fetching. second build is fast. the cdn hits happen once.

one command. no node. no bundler. no lockfile. the build is a couple of bash-called qjs scripts and curl.

it's the smallest thing that works.