tsconfig-paths icon indicating copy to clipboard operation
tsconfig-paths copied to clipboard

Invalid asterisk match - modulepath not found

Open willyboy opened this issue 5 years ago • 2 comments

I have the path:

"@foo/*/bars": ["foo/*/bars.ts"]

This is not matching my import of "@foo/beer/bar". Instead, it's matching something like, beer/ba. It should be matching on the beer. Solution: In the matchStar function, substr is used. The code implies that substring is what was intended. Substr takes a number of characters. Substring matches two indices; start and end. When switching to substring, the code works as expected.

willyboy avatar Sep 16 '20 14:09 willyboy

@jonaskello

willyboy avatar Sep 24 '20 01:09 willyboy

Ran into this problem too, and I can confirm that the PR fixes it. Little bit worried that this is still an open issue after ~3.5 years though.

Mrtenz avatar Feb 23 '24 10:02 Mrtenz