Skip to content

Stop bundling: ship dist/ as one file per module, CLI imports the library #83

Done

Description

@Shinrai

The build bundles src/ with tsup. Under the fleet rule in CLDMV/.github#582, builds no longer bundle: they don't move code around, merge modules into one file, or duplicate code to fit a bundler.

Here bin/gitmulti.mjs is a second bundle next to dist/index.mjs, so the CLI ships its own copy of the library.

What to change:

  • dist/ and bin/ mirror src/, one file per module, each minified in place with keepNames.
  • No tsup bundle, no splitting, no chunk-* files. The CLI imports the library from dist/ rather than carrying its own copy.
  • Check every new URL("./x", import.meta.url) and relative path for the new layout.
  • Keep the hand-written src/index.cjs shim, if there is one, as it is.

Reference: CLDMV/lib-sqlite-wasm scripts/build-js.mjs. Plain .mjs repos can use esbuild with bundle: false over src/**/*.mjs, as droidsock, git-embedded, jsonv and llm-translator already do through tsup's bundle: false.

Activity

  1. added
    type: enhancement
    priority: high
    status: not started
    on Nov 26, 2026
  2. added
    status: implemented
    and removed
    status: not started
    on Nov 28, 2026
  3. cldmv-bot commented on Nov 28, 2026

    @cldmv-bot
    Contributor

    Marked status: implemented — resolved by #88, merged into next. This issue closes automatically when that work ships to the default branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: highstatus: implementedtype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions