-
-
Notifications
You must be signed in to change notification settings - Fork 773
refactor!: opt-in experimental.tsconfigPaths
#3859
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe pull request tightens the conditional logic for TypeScript config path alias resolution by changing the guard condition from a falsy check to an explicit truthy requirement, accompanied by an example demonstrating proper feature enablement. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/config/resolvers/tsconfig.ts (1)
11-19: Guard change correctly makestsconfigPathsopt‑inRequiring
options.experimental.tsconfigPathsto be truthy here cleanly enforces the new opt‑in behavior and avoids applying tsconfig path aliases by default. Logic and alias merge order remain sound.If you want to soften the breaking change, you could optionally emit a warning when
compilerOptions.pathsexist butexperimental.tsconfigPathsis not enabled, to guide users to the new flag.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
examples/import-alias/nitro.config.ts(1 hunks)src/config/resolvers/tsconfig.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: tests-rolldown (windows-latest)
- GitHub Check: tests-rollup (ubuntu-latest)
- GitHub Check: tests-rollup (windows-latest)
🔇 Additional comments (1)
examples/import-alias/nitro.config.ts (1)
5-7: Explicit opt‑in toexperimental.tsconfigPathsis correctThis example now correctly demonstrates enabling tsconfig-based alias resolution only when the experimental flag is explicitly set to
true, matching the resolver behavior.
commit: |
In alpha.1, Nitro introduced
tsconfig.jsonsupport for aliases and JSX options. (#3757)Investigating integration with Nuxt with @danielroe, enabling aliases can cause issues as Nuxt generates paths meant for IDE support and not actual runtime resolution.
This PR disables the experimental flag and makes it opt-in. We might more advocate native node subpath import
#aliases.