feat: migrate build pipeline from tsc to tsdown#685
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Linear task is linked to this PR?
EMB-317: Migrate SDK and Widget build pipelines from tsc to tsdown
Why was it implemented this way?
Replace
tsc --buildwith tsdown (powered by Rolldown/OXC in Rust) across all 9 library packages. Full build time drops from ~78s to ~6s (~13x faster).Before vs After
check:typesstepWhat changed
Root:
tsdownas root devDependencyisolatedDeclarations: trueto root tsconfig (enables OXC-powered .d.ts generation)buildscript to run all packages in parallelPer library package (9 packages):
tsdown.config.tswith consistent config:unbundle: true,format: 'esm',outDir: 'dist/esm',target: 'es2020'tscbuild with singletsdowncommandneverBundle: [/\.json$/]for i18n JSON filesApp packages (widget-embedded, widget-playground-vite, nft-checkout):
isolatedDeclarations: falsein tsconfig (they don't emit declarations)Source files (~370 files):
isolatedDeclarations)createContext()andstyled()resultsimport('...').Typepatterns to properimport typestatementsWhy tsdown?
.d.tsis generated independently without cross-file type resolutionChecklist before requesting a review