Skip to content

build: bundle with tsup — 5-file dist, lazy DLP chunk#283

Merged
cdot65 merged 1 commit into
mainfrom
cdot65/build/tsup-bundle
Jul 7, 2026
Merged

build: bundle with tsup — 5-file dist, lazy DLP chunk#283
cdot65 merged 1 commit into
mainfrom
cdot65/build/tsup-bundle

Conversation

@cdot65

@cdot65 cdot65 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces raw tsc emit with tsup bundling. dist/ drops from ~200 ESM files (2.5MB) to 5 files (355KB unpacked; npm pack: 7 files, 74.7kB).

Changes

  • tsup.config.ts: dual entry (library index + CLI bin), esm, es2022, splitting on (keeps the src/dlp dynamic import as a separate lazy chunk), dts for the library entry, all deps external
  • build = tsup; build:tsc kept as escape hatch; CI typecheck still tsc --noEmit (unchanged)
  • CLAUDE.md build line updated

Verification

  • Shebang preserved; --version works; startup 0.06s
  • Lazy chunk: dlp generate --output json loads dlp chunk on demand, JSON parses clean
  • Library entry: 18 exports importable from dist/index.js; index.d.ts generated
  • Dockerfile unaffected (runs pnpm run build, copies dist/)
  • 690/690 tests; lint + tsc clean

Checklist

  • Gates green
  • Changeset (patch)

Closes #271

@cdot65 cdot65 merged commit fc708df into main Jul 7, 2026
4 checks passed
@cdot65 cdot65 deleted the cdot65/build/tsup-bundle branch July 7, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: bundle CLI with tsup

1 participant