Skip to content

fix(nuxt): fix TypeScript configuration chain for Nuxt components and composables #31701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Jun 24, 2025

  • Modified create-ts-config.ts to make tsconfig.json extend ./.nuxt/tsconfig.json instead of root tsconfig
  • Updated nuxt.config.ts template to make .nuxt/tsconfig.json extend the root tsconfig with correct relative path
  • Added relativePathToRootTsConfig parameter to template generation
  • Updated test snapshots to reflect the new configuration chain

This ensures IDEs can properly recognize Nuxt components, composables, and auto-imports by establishing the correct TypeScript configuration inheritance chain: tsconfig.app.json → tsconfig.json → .nuxt/tsconfig.json → tsconfig.base.json

Related Issues

#30742

… composables

- Modified create-ts-config.ts to make tsconfig.json extend ./.nuxt/tsconfig.json instead of root tsconfig
- Updated nuxt.config.ts template to make .nuxt/tsconfig.json extend the root tsconfig with correct relative path
- Added relativePathToRootTsConfig parameter to template generation
- Updated test snapshots to reflect the new configuration chain

This ensures IDEs can properly recognize Nuxt components, composables, and auto-imports by establishing the correct TypeScript configuration inheritance chain: tsconfig.app.json → tsconfig.json → .nuxt/tsconfig.json → tsconfig.base.json

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Coly010 Coly010 requested a review from a team as a code owner June 24, 2025 10:31
@Coly010 Coly010 requested a review from ndcunningham June 24, 2025 10:31
@Coly010 Coly010 self-assigned this Jun 24, 2025
Copy link

vercel bot commented Jun 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jun 24, 2025 10:44am

Copy link

nx-cloud bot commented Jun 24, 2025

View your CI Pipeline Execution ↗ for commit fdffd36.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 5m 7s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 16s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 5s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 4s View ↗
nx documentation ✅ Succeeded 2m 26s View ↗

☁️ Nx Cloud last updated this comment at 2025-06-24 10:43:11 UTC

@Coly010 Coly010 merged commit 52af423 into master Jun 24, 2025
8 checks passed
@Coly010 Coly010 deleted the 30742-nuxt-config branch June 24, 2025 16:51
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants