-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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: resolve nested dependencies (#3254) #3753
Conversation
Awesome! So this fix can be merged now? |
I checked the demo and find out that the dependency And I checked the code, vite has it's own way to resolve deps, it creates So using single It seems not easy to extract a independent funciton to resolve sub-deps path from deps directory in vite's way. You may revert this fix for current release, but we still need to find a way to fix the problem. |
* fix: resolve nested dependencies (vitejs#3254) * chore: inline packages * chore: force optimize * chore: cleanup Co-authored-by: Anthony Fu <[email protected]>
The issue still exists [email protected], and #4014 and #4012 are closed, is there anyone still working on the issue? |
@dickeylth would you create a new issue against the latest version of vite ([email protected]) so we can properly track the bug report? |
Description
Current vite(2.3.7) cannot resolve nested package on dev mode.
If a project has dependencies like this:
Only
[email protected]
will be load at runtime, andpackage-b
actually import[email protected]
instead of[email protected]
.Additional context
There was two fixes before.
#3003 uses
resolveDir
as module location, which worked. But it mistakenly useflatId
as module path, causing scoped package cannot be resolved.#3053 changed
flatId
toqualified[flatId]
, which fixed scoped package problem, but again the nested pacakge problem occurs.I'm not sure if this commit finnally fix the problem, or causing further errors, it passed the tests anyway.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).