Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

fixed bug with resolve and absolute aliases on windows#18

Closed
hzrd149 wants to merge 3 commits intorollup:masterfrom
hzrd149:master
Closed

fixed bug with resolve and absolute aliases on windows#18
hzrd149 wants to merge 3 commits intorollup:masterfrom
hzrd149:master

Conversation

@hzrd149
Copy link

@hzrd149 hzrd149 commented Apr 14, 2017

this pull request is to fix the bug that arises when you use absolute paths in aliases on Windows

for example, if you do this

alias({
  resolve: ['.jsx', '.js'],
  lib: path.resolve(__dirname, './lib/')
})

and then if you import lib/some/file it wont resolve to /absolute/path/project/lib/some/file.jsx, since the lib alias has the drive letter in it, and the code here dose not test for a drive letters

to fix this, i made it strip out the drive letter once it has replaced the alias in the importeeId path

@Rich-Harris
Copy link
Contributor

Thanks for the PR. I'm hoping that this is similar to #22. If you get a chance to try 1.4.0 could you see if the issue is resolved please?

@hzrd149
Copy link
Author

hzrd149 commented Oct 20, 2017

@Rich-Harris looks like that fixed it 👍

thanks for the fix

@hzrd149 hzrd149 closed this Oct 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments