tsconfig-paths

How to have absolute import paths in a library project?

让人想犯罪 __ 提交于 2019-12-05 17:09:20
问题 I have a library with a workspace containing two projects, one for the library itself and one for a test application. ├── projects ├── midi-app └── midi-lib In the workspace tsconfig.json file I configured some @app and @lib paths: "paths": { "@app/*": ["projects/midi-app/src/app/*"], "@lib/*": ["projects/midi-lib/src/lib/*"], "midi-lib": [ "dist/midi-lib" ], "midi-lib/*": [ "dist/midi-lib/*" ] } There is a projects/midi-lib/tsconfig.lib.json file which extends on the above tsconfig.json file