-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(vite): deep file resolution in nx-tsconfig-paths.plugin.ts #21513
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit d7ed4a6. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
(cherry picked from commit 9a9bd2a)
(cherry picked from commit 9a9bd2a)
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. |
Deep file resolution fails when trying to use tsconfig paths like:
"paths": {
"@org/sdk/": ["libs/sdk/src/lib/"],
}
And importing:
import thing from '@org/sdk/thing';
TS is happy with this but vite fails to resolve.
I could be missing something but the original code doesn't actually use tsconfig.absoluteBaseUrl so path resolution fails as the relative path is used.
Current Behavior
Deep file resolution fails when trying to use tsconfig paths like:
And importing:
import thing from '@org/sdk/thing';
TS is happy with this but vite fails to resolve the file.
Expected Behavior
The import path should be resolved taking into account the project structure.
Fixes #21512