Our angular application is getting refactor to be split up into multiple small libraries. However we are having problems creating the links in between the libraries. Most articles explain in details how they can be created, their advantages, but so far we did not find an example how to link them together.
The only way we found, to link them together, is to add the path of the compiled shared library to the tsconfig.
Example for tsconfig.lib.prod.json
:
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"compilationMode": "partial",
"paths": {
"company/shared": [
"dist/company/shared"
]
}
}
}
However this would be quite hard to maintain, because we have to keep those references up to date, build the project in the right order, etc.
Is there a better way to do it?
Articles to this topic: