-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Vite resolves file from cwd instead of node module if the names are identical #15500
Comments
Start a new pull request in StackBlitz Codeflow. |
If the
vite/packages/vite/src/node/plugins/resolve.ts Lines 253 to 257 in f43945c
Using it in the following way may meet your expectations. await s.pluginContainer.resolveId('tsoa’, null) |
Thank you for investigating. I can confirm that passing down the importer correctly resolves the path. |
Describe the bug
This is based on vitest-dev/vitest#4860
I was able to reduce reproduction to a few lines:
The expectation is that
tsoa
will be resolved to the package in node modules, not totsoa.json
file in the root of the project.Reproduction
https://stackblitz.com/edit/vitejs-vite-pivsa8?file=vite.mjs,package.json
Steps to reproduce
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: