Closed daniel-ac-martin closed 4 years ago
Sorry, I've just spotted the extra comment on the README of the 1.x
branch. It seems this is a bad default that you intend to fix in the next major release.
In that case, the problem I have is with the package calling resolve and not resolve itself.
Apologies for the inconvenience. I'll close this issue. Hopefully it will help someone else who come across this.
You can npm install resolve@next
if you want to try out the latest v2 prerelease, which has this default flipped.
The v1.17 release (and indeed the
1.x
branch) seems to default to preserving symlinks whereas themaster
branch does not.Is this by design or is it a bug?
The root cause seems to be this line: https://github.com/browserify/resolve/blob/1.x/lib/sync.js#L42 It will only convert to a real path when the
preserveSymlinks
flag has been explicitly set to false.Contrast that with this line (from
master
): https://github.com/browserify/resolve/blob/master/lib/sync.js#L42 It will always convert unless thepreserveSymlinks
flag has been given a truthy value.