Skip to content
Discussion options

You must be logged in to vote

For Vite 8/rolldown migration, a practical path is:

  1. Keep declaration emit in tsc (fast + stable), and let Vite/rolldown handle JS bundling.
  2. If you need single-file .d.ts, run API Extractor as a post-step.

Example pipeline:

{
  "build": "vite build && tsc -p tsconfig.build.json --emitDeclarationOnly",
  "types:bundle": "api-extractor run --local"
}

This avoids vite-plugin-dts bottlenecks while preserving bundled type output when needed.

Also worth checking:

  • skipLibCheck only for app projects (not libraries)
  • split tsconfig.build.json with narrow include
  • disable source maps for type emit stage

In short: JS bundle with Vite, types with tsc/API Extractor is currently the most predictable a…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wesleymatosdev
Comment options

Answer selected by wesleymatosdev
Comment options

You must be logged in to vote
1 reply
@wesleymatosdev
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants