We have a weird half-legacy setup that has both a jsconfig.json for our legacy code and a tsconfig.json for our modern code. Both files define "paths" containing different sets of paths. v4 of this package handled this just fine, but in v5 it seems to only check the jsconfig then abort without ever checking the tsconfig.json.
From looking at the diff between v4 and v5 I suspect that v4 had the same bug but in reverse (i.e. it only read the tsconfig and not the jsconfig), and it just happened to not cause any issues because the jsconfig only has native node imports definitions.
Changing this line to be return [path && suffix ? path + suffix : path, !!path] fixed the issue for me. Not sure if there is a cleaner solution though.
We have a weird half-legacy setup that has both a jsconfig.json for our legacy code and a tsconfig.json for our modern code. Both files define
"paths"
containing different sets of paths. v4 of this package handled this just fine, but in v5 it seems to only check the jsconfig then abort without ever checking the tsconfig.json.From looking at the diff between v4 and v5 I suspect that v4 had the same bug but in reverse (i.e. it only read the tsconfig and not the jsconfig), and it just happened to not cause any issues because the jsconfig only has native node
imports
definitions.Changing this line to be
return [path && suffix ? path + suffix : path, !!path]
fixed the issue for me. Not sure if there is a cleaner solution though.