Skip to content

feat: support TypeScript 7 (tsc 7)#2147

Closed
rorychatt wants to merge 3 commits into
voidzero-dev:mainfrom
rorychatt:support-tsc-7
Closed

feat: support TypeScript 7 (tsc 7)#2147
rorychatt wants to merge 3 commits into
voidzero-dev:mainfrom
rorychatt:support-tsc-7

Conversation

@rorychatt

@rorychatt rorychatt commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds support for TypeScript 7 (tsc 7) to vite-plus.

Currently, vite-plus only lists ^5.0.0 || ^6.0.0 in its peer dependencies, which causes installation warnings/errors in projects that upgraded to TypeScript 7.

Closes #2148

Changes

  • Core Package (packages/core/build.ts): Updated the mergePackageJson() build step to append || ^7.0.0 to the typescript peer dependency of @voidzero-dev/vite-plus-core.
  • Monorepo Templates (packages/cli/templates/monorepo/): Updated the generated pnpm-workspace.yaml and _yarnrc.yml templates to support ^5 || ^6 || ^7.
  • Lockfile (pnpm-lock.yaml): Regenerated the workspace lockfile after resolving dependencies.

Note: The workspace devDependencies of the vite-plus codebase itself remain pinned to TypeScript ^6.0.0 for development, as upstream packages (like rolldown and tsdown) currently rely on programmatic compiler APIs that are not yet compatible with the TypeScript 7 API.

Verification

All 870 unit/integration tests in vite-plus compile and pass successfully under the updated configurations.

@netlify

netlify Bot commented Jul 10, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 8ff089c
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a515787a9fc890008fc1d53

@wan9chi

wan9chi commented Jul 14, 2026

Copy link
Copy Markdown
Member

@rorychatt Thank you for reporting and fixing the issue. While reviewing it I found the peer range turns out to be only part of the problem: TypeScript 7 removed the old compiler API that our bundled tsdown used for vp pack declaration generation (the error in #2160). Widening the range alone would let new projects install TS7 while their builds still fail.

Both parts are now fixed in #2168: the newer tsdown allows TS7 in its peer range and generates declarations with the TS7 native compiler. So we'll close this PR in favor of that one. Thanks again for raising the issue and getting the work started. The fix will be in the next release.

@wan9chi wan9chi closed this Jul 14, 2026
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.

feat: support TypeScript 7

2 participants