resolve: Resolve doesn't resolve real path for `basedir` if it is relative path
resolve doesn’t resolve real path for basedir if it is relative path.
I’v created a bad case example ( by lerna ) here https://github.com/malash/resolve-bad-case
The issue is related to https://github.com/browserify/resolve/issues/130 . The issue effected https://github.com/peerigon/extract-loader/issues/48 and may affect https://github.com/browserify/resolve/issues/163 .
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (10 by maintainers)
Commits related to this issue
- [Fix] `sync`/`async`: fix `preserveSymlinks` option Fixes #177. — committed to browserify/resolve by ljharb 6 years ago
- v1.9.0 - [New] `async`/`sync`/`node-modules-paths`: Adds support for “paths” being a function (#172, #173) - [New] Implements a "normalize-options" pseudo-hook (#174) - [Fix] `sync`/`async`: fix `... — committed to browserify/resolve by ljharb 6 years ago
Thank you for your excellent repro case!
@ljharb Thank you very much for your commit. This commit works for me.
I update the test case and the bug still exists.
https://github.com/malash/resolve-bad-case/commit/c5ea1c8d577bd35ecb586ad82d16b54499893be7
In fact
preserveSymlinksisn’t used at all in https://github.com/browserify/resolve/blob/master/lib/sync.js#L49-L52