build(kumo): bundle CLI with vp pack - #680
Conversation
commit: |
Docs PreviewCommit: |
|
/bonk review |
There was a problem hiding this comment.
Nice cleanup — replacing the custom esbuild script and CSS copy script with an integrated vp pack pass is a clear win. The new setup is simpler, the tests verify the build artifacts correctly, and the old redundant per-command bundles are eliminated.
A few observations:
-
The old
build-cli.tsproduced separate bundles for each command file (commands/ls.js,commands/doc.js, etc.) that were never actually imported bycli.jsbecause esbuildbundle: truealready inlined them. Collapsing to a singlecli.jsentry is the correct fix. -
deps: { neverBundle: true }for the CLI pass externalizes Node dependencies while bundling the local command-line imports into the single output — this is exactly what's needed for a package-bundled CLI. -
The
getPackageAssetConfig()integration into the CLI pack entry is elegant. ThewriteBundleplugin for Tailwind standalone CSS runs only duringcommand === 'build', which avoids unnecessary work in dev/watch mode. -
Tests comprehensively cover the new behavior: single CLI bundle, shebang, CSS parity, block source copying, and a functional smoke test through the package bin.
One minor suggestion inline. Otherwise LGTM!
|
I've reviewed PR #680 and submitted a batch review. Here's the summary: Overall assessment: LGTM — this is a clean consolidation of the build pipeline. The PR correctly replaces two custom scripts (
One minor inline suggestion was left on |
📐 Bundle SizeConsumer fixtures bundled against
npm tarball: 510 files, 1.42 MB packed, 6.70 MB unpacked.
|

















































































Replace the CLI script that calls esbuild multiple times with a
tsdown/vp packpass, so no external build script or scaffolding is needed anymore.This also fully removes esbuild from the toolchain 🎉
Speed is roughly the same (~180ms faster), and output is equivalent.