Skip to content

refactor(cli): migrate build from tsc+rolldown to tsdown#1276

Merged
graphite-app[bot] merged 1 commit intomainfrom
bundle-all
Apr 3, 2026
Merged

refactor(cli): migrate build from tsc+rolldown to tsdown#1276
graphite-app[bot] merged 1 commit intomainfrom
bundle-all

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Apr 2, 2026

Replace the split build strategy (tsc for local CLI code, rolldown for
global modules) with a unified tsdown configuration that bundles all
entry points to dist/.

  • All third-party deps are now inlined at build time, eliminating
    dependency classification confusion between dependencies/devDependencies
  • Move cac, cross-spawn, jsonc-parser, picocolors to devDependencies
  • Remove rolldown.config.ts and direct rolldown devDependency
  • Dynamic imports in bin.ts now use source-relative paths (./create/bin.js)
    which tsdown resolves and rewrites automatically
  • Remove @ts-ignore comments since TypeScript can now resolve the imports
  • Add cleanDistOutput() to remove stale tsc/rolldown artifacts before build

Closes #744

Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 2, 2026


How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 force-pushed the bundle-all branch 6 times, most recently from 0e7c230 to c2008c9 Compare April 2, 2026 16:35
@fengmk2 fengmk2 marked this pull request as ready for review April 3, 2026 01:24
@graphite-app graphite-app bot changed the base branch from support-tools-as-ts-package to graphite-base/1276 April 3, 2026 01:26
Copy link
Copy Markdown
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This is a lot simpler.

Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 3, 2026

Nice! This is a lot simpler.

Sorry for being late. 😀​

@graphite-app graphite-app bot force-pushed the graphite-base/1276 branch from c5fdcf9 to ea02a9c Compare April 3, 2026 01:32
@graphite-app graphite-app bot changed the base branch from graphite-base/1276 to main April 3, 2026 01:33
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 3, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 1fe4cff
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69cf1eb1d18f1b00089eba55

@fengmk2 fengmk2 force-pushed the bundle-all branch 2 times, most recently from 1ff7cfb to 7caaa09 Compare April 3, 2026 01:35
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Apr 3, 2026

Merge activity

Replace the split build strategy (tsc for local CLI code, rolldown for
global modules) with a unified tsdown configuration that bundles all
entry points to dist/.

- All third-party deps are now inlined at build time, eliminating
  dependency classification confusion between dependencies/devDependencies
- Move cac, cross-spawn, jsonc-parser, picocolors to devDependencies
- Remove rolldown.config.ts and direct rolldown devDependency
- Dynamic imports in bin.ts now use source-relative paths (./create/bin.js)
  which tsdown resolves and rewrites automatically
- Remove @ts-ignore comments since TypeScript can now resolve the imports
- Add cleanDistOutput() to remove stale tsc/rolldown artifacts before build

Closes #744
@graphite-app graphite-app bot merged commit 1fe4cff into main Apr 3, 2026
67 checks passed
@graphite-app graphite-app bot deleted the bundle-all branch April 3, 2026 02:04
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.

refactor: migrate packages/cli build from tsc+rolldown to tsdown

2 participants