Answer the question
In order to leave comments, you need to log in
How to force the compiler to recalculate paths (compilerOptions.paths) into relative ones?
I made a component library for React in TypeScript. I wrote the following in the tsconfig.json file:
{
"compilerOptions": {
...
"paths": {
"@lib": ["src/lib"],
"@lib/*": ["src/lib/*"]
}
import {} from '../../../from/field/ComboBox';
import {} from '@lib/from/field/ComboBox';
build/dist/lib/form/combo/ComboBox.d.ts
(3,40): Cannot find module '@lib/form/list/List'.
Answer the question
In order to leave comments, you need to log in
Possible solutions to the problem:
goenning.net/2017/07/21/how-to-avoid-relative-path
...
last answer:
https://stackoverflow.com/questions/37606571/absol...
Homemade from chat (note that ts-simple-ast is used):
https://gist.github.com/rifler/e6123e90e172814fe23...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question