To shorten my import paths within my library I've added
"paths": {
"@services": ["lib/services"]
}
to my tsconfig.lib.json
. My directory structure is mostly default, with having multiple projects consuming one library:
projects
library/
src/
lib/
services/
index.ts
tsconfig.lib.json
[projects...]
I want to use imports like
import {service} from "@services";
just within my library - but so far I'm getting a "Cannot find module @services
" error.
I guess the path is incorrect - but I can't figure out how to fix that. Anyone got an idea?
edit: Used baseUrl: "src" - this works for building, but not when starting one of the projects with ng serve (due to the same error, "cannot find module"). (no aot flag used)
Thanks.