Skip to content

fix: isolate typecheck for nuxt apps#387

Merged
antfu merged 1 commit into
mainfrom
fix-typecheck
Jun 24, 2026
Merged

fix: isolate typecheck for nuxt apps#387
antfu merged 1 commit into
mainfrom
fix-typecheck

Conversation

@webfansplz

Copy link
Copy Markdown
Member

Summary

Make the Vite and self-inspect Nuxt apps typecheck against their own generated Nuxt tsconfigs instead of relying on the Rolldown app's workspace-wide typecheck.

Problem

The root tsconfig.json only referenced Rolldown's generated Nuxt tsconfigs. Since Rolldown uses includeWorkspace, its generated tsconfig.app.json includes the parent workspace and can end up checking files from other packages, including vite and self-inspect.

That means Vite and self-inspect were not being checked in their own Nuxt type environments. This can hide app-specific type errors, especially around generated Nuxt aliases, imports, components, and app/server/shared/node tsconfig boundaries. It can also report errors through the wrong Nuxt app context.

Solution

  • Reference the Rolldown, Vite, and self-inspect package tsconfig wrappers from the root tsconfig.json.
  • Keep Rolldown's existing workspace coverage for the other packages.
  • Exclude the Vite and self-inspect packages from Rolldown's workspace-wide Nuxt typecheck.
  • Update self-inspect to use the same Nuxt project-reference tsconfig shape as the other Nuxt apps.

This keeps the change minimal while giving the Vite and self-inspect Nuxt apps their own typecheck coverage. Longer
term, we can move toward explicit tsconfig and typecheck scripts for every package.

Copilot AI review requested due to automatic review settings June 23, 2026 16:12
@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/devtools@387
npm i https://pkg.pr.new/@vitejs/devtools-kit@387
npm i https://pkg.pr.new/@vitejs/devtools-rolldown@387
npm i https://pkg.pr.new/@vitejs/devtools-self-inspect@387

commit: 0012bca

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the monorepo’s TypeScript project references so each Nuxt-based app (rolldown, vite, self-inspect) is typechecked against its own generated Nuxt tsconfigs, avoiding cross-app leakage caused by Rolldown’s workspace-wide Nuxt typecheck.

Changes:

  • Switch root tsconfig.json references from Rolldown’s generated .nuxt tsconfigs to per-app wrapper src/tsconfig.json files.
  • Remove typescript.includeWorkspace from the Vite and self-inspect Nuxt apps so they typecheck in their own Nuxt context.
  • Keep Rolldown’s workspace-wide Nuxt typecheck, but exclude the vite and self-inspect packages from it, and align self-inspect’s wrapper tsconfig shape with the others.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.json Root solution references now point at per-app Nuxt wrapper tsconfigs for rolldown/vite/self-inspect.
packages/vite/src/nuxt.config.ts Removes typescript.includeWorkspace to avoid workspace-wide Nuxt typechecking for the Vite app.
packages/self-inspect/src/tsconfig.json Converts self-inspect to the wrapper project-reference shape (references + files: []).
packages/self-inspect/src/nuxt.config.ts Removes typescript.includeWorkspace to keep self-inspect’s Nuxt typecheck isolated.
packages/rolldown/src/nuxt.config.ts Excludes vite and self-inspect directories from Rolldown’s workspace-wide Nuxt typecheck.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@antfu antfu merged commit 12d3659 into main Jun 24, 2026
11 checks passed
@antfu antfu deleted the fix-typecheck branch June 24, 2026 02:16
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.

3 participants