-
Notifications
You must be signed in to change notification settings - Fork 58
Troubles with isFilePath on windows #3
Comments
this is the function causing an issue |
My use-case was broken when I upgraded because of |
Hi @lukeapage, thank you for reporting the issue and I'm terribly sorry for the inconvenience. The regex looks good to me. I'm wondering if there isn't a Node.js built-in method that would do the check for us more predictably for different platforms? |
The trouble is that although there is an |
I am experiencing this - the pull request to resolve it works well for me. |
@Rich-Harris I think this should still be open? The original problem with relative addresses beginning with |
Hi,
I'm having trouble getting isFilePath to match on windows - and therefore am not getting extensions being resolved.
If I give an absolute resolved path to alias, the regex does not pass on windows (because its
c:\a\b
not\a\b\
If I give a relative path, it doesn't work because I need
../
at the begining.I'm currently solving this by passing this alias
perhaps the isFilePath could be
/^(\.{0,2}[\/\\]|[a-z]:\/\/)/i
- what do you think?The text was updated successfully, but these errors were encountered: