-
Notifications
You must be signed in to change notification settings - Fork 37
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
ensure we don't resolve modules in parent folders #158
Comments
BTW. The chain of calls that leads to this code is:
|
Hmm, there is more issues like that elsewhere. For example in
|
This rabbit hole goes deep. |
Hi dear @rchl. Thanks for sharing all investigations. Yes, that's kinda tricky situation. We removed the directory URL workaround but it introduced other regressions in Nuxt 3. I think first good step would be making a minimal mlly reproduction to test the behavior if you can help 🙏🏼 . We might try to introduce a major version on progressively adopt it within nuxt ecosystem. |
I'm thinking that a unittest for that would be a good reproduction? |
Yeah. We probably could make an external repo for it. Especially trying node_modules resolution too via an exclude in |
I've stumbled upon a crash trying to start a Nuxt 3-based project in a subdirectory of a Nuxt 2 project.
So the main Nuxt 2 project at
/project/
and a Nuxt 3-baseddocs
subdirectory at/project/docs
. This crashes due tonuxt
dependency from the root project getting picked up.It seems the issue is in this code:
mlly/src/resolve.ts
Lines 75 to 79 in 6327ad8
This
_resolve
function receives anid
parameter with anuxt
value.It creates
url
with the value of the current working directory so/project/docs
.Then
new URL("./", url)
actually resolves to the/project/
directory instead of/project/docs
which seems very much not expected to me.Try this in a browser:
(Same for the
new URL("node_modules", url)
line above which seems to be scheduled for removal at some point)The text was updated successfully, but these errors were encountered: