Open dherges opened 6 years ago
Do the paths
values always point to specific modules or can they be patterns that are replaced in the URL?
I am worried that this reverse lookup for every call is needlessly expensive. If it is the case that the paths values are always specific files, then we could invert this hash just once and then get fast lookups as needed; perhaps storing it alongside the other information that comes from TsParser?
How It's Used
Configure TypeScript
compilerOptions.paths
to resolve (and eventually display) a module path for a npm package.Similar to Material: https://github.com/angular/material2/blob/master/tools/dgeni/index.ts#L112