Skip to content

docs(installation): note vue-tsc build race with auto-import declarations - #6777

Merged
benjamincanac merged 1 commit into
nuxt:v4from
lazerg:docs/vue-auto-import-build-race
Jul 29, 2026
Merged

docs(installation): note vue-tsc build race with auto-import declarations#6777
benjamincanac merged 1 commit into
nuxt:v4from
lazerg:docs/vue-auto-import-build-race

Conversation

@lazerg

@lazerg lazerg commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Resolves #6769

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

The auto-imports.d.ts and components.d.ts files only exist once Vite has run. The default create-vue build script type-checks in parallel with the Vite build, so on a clean checkout vue-tsc can run before those files are generated and fail with errors like Cannot find name 'useToast'. This adds a warning to the Vue installation page explaining the race and how to avoid it by type-checking after the build.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@lazerg
lazerg requested a review from benjamincanac as a code owner July 29, 2026 03:55
@github-actions github-actions Bot added the v4 #4488 label Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 49e3ff8d-9d62-4289-bd8c-bdd1ade584e8

📥 Commits

Reviewing files that changed from the base of the PR and between 282759e and 527a3c7.

📒 Files selected for processing (1)
  • docs/content/docs/1.getting-started/2.installation/2.vue.md

📝 Walkthrough

Walkthrough

The Vue installation documentation adds a warning that Vite plugins generate auto-imports.d.ts and components.d.ts during the build, while the default parallel build can start vue-tsc first. The documented build script is updated to run build-only before type-check.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the documentation update about the vue-tsc race and auto-import declarations.
Description check ✅ Passed The description is on-topic and matches the documentation change and linked issue.
Linked Issues check ✅ Passed The docs now warn about the Vite/vue-tsc race and recommend type-checking after the build, matching #6769.
Out of Scope Changes check ✅ Passed The changes stay within the requested documentation scope and do not introduce unrelated updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/ui@6777

commit: 527a3c7

@benjamincanac benjamincanac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! 😊

@benjamincanac
benjamincanac merged commit a158e26 into nuxt:v4 Jul 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] auto-import type declarations might not generated in the integration with vue projects

2 participants