chore: migrate build toolchain from browserify/uglify-js to tsdown#135
chore: migrate build toolchain from browserify/uglify-js to tsdown#135mmktomato merged 13 commits intonulab:masterfrom
Conversation
|
This might resolve #88 |
|
Memo: Conflicts to #133 . Checking internally. |
mmktomato
left a comment
There was a problem hiding this comment.
@lollipop-onl
I added a comment. Can you check it?
| "esModuleInterop": true, | ||
| "skipLibCheck": true | ||
| }, | ||
| "ts-node": { |
There was a problem hiding this comment.
We don't use ts-node, is this necessary?
There was a problem hiding this comment.
This is being added because mocha runs ts-node internally.
It will no longer be necessary if we can migrate to Vitest or a similar tool in #133.
Replace tsup with tsdown (Rolldown-based bundler) for faster builds. Add browser field for CDN resolution and copy IIFE outputs to legacy filenames (backlog.js, backlog.min.js) for backward compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mark dist/ as linguist-generated so GitHub collapses build artifacts in pull request diffs by default. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@mmktomato |
|
OK 👍 |
mmktomato
left a comment
There was a problem hiding this comment.
@lollipop-onl
I added some comments again. Otherwise it looks fine 👍
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@lollipop-onl |
Migrate the build toolchain from
tsc -> browserify -> uglifyjstotsdown(Rolldown-based bundler), enabling multi-format output for ESM / CJS / IIFE (browser).fixes #88
Motivation
exportsmap causes type resolution failures undermoduleResolution: "node16"/"bundler"Changes
dist/backlog.min.js(UMD, 93 KB)dist/index.mjs(ESM, 38 KB),dist/index.cjs(CJS, 39 KB),dist/backlog.iife.min.js(IIFE, 56 KB)dist/types/*.d.tsdist/index.d.cts(CJS),dist/index.d.mts(ESM)exportsconditions topackage.jsonfor correct ESM/CJS type resolutionbrowserfield pointing to IIFE minified bundle for CDN resolution (unpkg, jsdelivr)backlog.js,backlog.min.js) for backward compatibilitytsdowncommand withpostbuildhooktsconfig.jsonto target the minimum supported environment (requiresfetch/FormData/Promise)No changes were made to source code (
src/), tests (test/), or the public API.Why tsdown
Selected over tsup, Vite, Rollup, and unbuild for:
Breaking Changes
fetch,FormData, andPromise, the effective supported environment range is unchanged.