Unfortunately resolve.sync uses the dirname only:

https://github.com/substack/node-resolve/blob/master/lib/sync.js#L32