-
Notifications
You must be signed in to change notification settings - Fork 359
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
Improve resolve on windows #689
Conversation
require_resolve(ctx, name, base, true).map(|name| { | ||
if cfg!(not(windows)) { | ||
name.into_owned() | ||
} else { | ||
name.replace("\\", "/") | ||
} | ||
}) |
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.
We have a "to_abs_path" used by require_resolve
in various places. Use that method inside of require resolve where this case isn't covered!
@ahaoboy , Thanks for addressing this issue. I may have missed it in the recent fixes. The results returned by I'll take a look at this if you don't mind. :) |
The logic is indeed a bit complicated, and I'm not sure whether it should be handled here. If there is a better way, you can directly submit a new PR |
Strange error And we may also need to handle node protocols such as |
Description of changes
The following test fails on Windows due to the path separator
Checklist
tests/unit
and/or in Rust for my feature if neededmake fix
to format JS and apply Clippy auto fixesmake check
types/
directory