-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Labels
Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Hi there, since TS supports paths in tsconfig.json, is there an API in the compiler (Program, CompilerHost or something) to programmatically resolve real path of an import?
I wrote this transformer https://github.com/longlho/ts-transform-css-modules and it's tripping up on paths that are aliased in tsconfig.json, e.g:
import * as css from 'alias/foo.css'
tsconfig.json
{
"compilerOptions": {
"paths": {
"alias/*": "../../../some_location/*"
}
}
}
I can try to manually reconstruct TS resolver but rather not to.
Thanks!
TylorS, langpavel and andbar-ru
Metadata
Metadata
Assignees
Labels
Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript