-
-
Notifications
You must be signed in to change notification settings - Fork 608
fix(externals)!: fall back to mlly
resolver in more cases
#431
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
Codecov Report
@@ Coverage Diff @@
## main nuxt/nuxt.js#11753 +/- ##
==========================================
- Coverage 53.54% 53.53% -0.02%
==========================================
Files 54 54
Lines 3565 3566 +1
Branches 377 378 +1
==========================================
Hits 1909 1909
Misses 1293 1293
- Partials 363 364 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Would you please provide a (nitro) reproduction? ππΌ |
I believe the fix makes sense on its own for the reasons mentioned in the description. But here you go: https://stackblitz.com/edit/nuxt-starter-qlsvtz. |
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.
LGTM to include in next semver-major since this change is risky somehow.
For next PRs, please use a minimal nitro reproduction to help me review faster ππΌ
mlly
resolver in more casesmlly
resolver in more cases
π Linked issue
context: nuxt/nuxt#14629
β Type of change
π Description
In the linked issue above, the presence of a directory
express
was skipping the mlly resolution process as the path existed. I've added a couple of additional conditions here:mlly
if id is not absolute (express.js
) won't map to~/express.js
in node termsmlly
if id is a directory - as directory imports won't work in esm and we need to resolve/index.js
normalizeid
on absolute paths as otherwise (ifmlly
absolutely can't resolve it) we can end up with something likefile://express
π Checklist