I have created one angular library repo and one parent repo where i added angular library as a submodule. My code structure is this :
parent-project/
├── src/ <- parent project src
├── angular.json
└── ...
|---library/ <- Library Angular project
│ ├── src/
│ ├── ng-package.json <- Configuration for library packaging
│ └── ...
├── angular.json <- Angular CLI configuration for parent project
├── package.json <- Dependencies and build scripts for the parent project
└── ...
the build of library is created inside library directory in dist folder, and the build for the parent project is made in the parent project directory. i have added in the parent project tsconfig.json the path for the library :
"paths": {
"@lib/library": [
"dist/library/*",
"dist/library"
],
"@lib/library/*": [
"projects/library/*",
"projects/library"
]
},
it runs perfectly in my local. but while deploying it to aws amplify, it didnt work. i am confused how it is going to work in production (when deployed in server). The dist for parent project and the dist for the library lies in different places, will the parent project dist be able to use the components from library dist in production?
How is it going to work on production? How should i deploy on production?
Please provide a solution. I am using angular 16 in both parent and library.