fix: isolate typecheck for nuxt apps#387
Merged
Merged
Conversation
commit: |
Contributor
There was a problem hiding this comment.
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.jsonreferences from Rolldown’s generated.nuxttsconfigs to per-app wrappersrc/tsconfig.jsonfiles. - Remove
typescript.includeWorkspacefrom 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
viteandself-inspectpackages 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.
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.
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.jsononly referenced Rolldown's generated Nuxt tsconfigs. Since Rolldown usesincludeWorkspace, its generatedtsconfig.app.jsonincludes the parent workspace and can end up checking files from other packages, includingviteandself-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
tsconfig.json.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.