-
-
Notifications
You must be signed in to change notification settings - Fork 6.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: call tryFsResolve
for relative new URL(foo, import.meta.url)
#13142
fix: call tryFsResolve
for relative new URL(foo, import.meta.url)
#13142
Conversation
Run & review this pull request in StackBlitz Codeflow. |
new URL(foo, import.meta.url)
tryFsResolve
for relative new URL(foo, import.meta.url)
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
Given that this was working in 4.2, I think it is a good idea to move forward with your PR. We can discuss the breaking change for Vite 5, but I think we may need to keep supporting this. |
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.
Nuxt and Astro are also failing in main
Description
new URL('./path-without-extension', import.meta.url)
was supported in past but wasn't working since 4.3. This was caused by #12450.fixes #13141
refs #7837
Additional context
I wonder if we should remove these resolvings from
new URL(foo, import.meta.url)
(i.e. only support relative paths with extensions) asnew URL
is a constructor that simply resolves relative paths. Instead to introduceimport.meta.resolve
for that usage asimport.meta.resolve
will resolve like node and it works with Node.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).