You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stop bundling: ship dist/ as one file per module #83
priority: mediumShould be addressed in the normal course of developmentstatus: implementedBuilt and deployed, but not yet fully tested/verifiedtype: enhancementAn improvement to existing functionality without adding a new feature
The build bundles src/ into one dist/index.mjs 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.
What to change:
dist/ mirrors src/, one file per module, each minified in place with keepNames. Keep the node16 target.
No tsup bundle, no splitting, no chunk-* files.
Check every new URL("./x", import.meta.url) and relative path for the new layout (wisp's resolve-from-caller logic is sensitive to where its file lives).
Keep the hand-written src/index.cjs shim 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.
v4.46.0 also shipped the generic index.cjs (CLDMV/.github#589, examples/package-layout/src/index.cjs): require() returns the single exported value when the ESM entry has one distinct value, otherwise the module object import gives. This package exports wisp and wispSync, so adopting it changes what require() returns — require(pkg)(…) callers need require(pkg).default or the named export. Roll it into the same major as the build change here.
priority: mediumShould be addressed in the normal course of developmentstatus: implementedBuilt and deployed, but not yet fully tested/verifiedtype: enhancementAn improvement to existing functionality without adding a new feature
Activity
Shinrai commentedon Nov 27, 2026
v4.46.0 also shipped the generic
index.cjs(CLDMV/.github#589,examples/package-layout/src/index.cjs):require()returns the single exported value when the ESM entry has one distinct value, otherwise the module objectimportgives. This package exportswispandwispSync, so adopting it changes whatrequire()returns —require(pkg)(…)callers needrequire(pkg).defaultor the named export. Roll it into the same major as the build change here.refactor: build dist one file per module instead of bundling
cldmv-bot commentedon Nov 28, 2026
Marked
status: implemented— resolved by #91, merged intonext. This issue closes automatically when that work ships to the default branch.release: v2.0.0 - switch the CJS entry to the generic shim