I am currently experiencing an issue with my Angular library that has description files *.d.ts in a specific structure as shown below:
├ src
│ ├ my-lib
│ │ ├ my-typedef.d.ts
│ └ public_api.ts
│
└ tsconfig.lib.json
In the tsconfig.lib.json file, I have included it like this:
"include": [
"src/lib/typedefs"
],
Edit
Prior to upgrading to Angular 10, the configuration was set to Angular 8. The compile process included these files in the final package build. However, after the upgrade to Angular 10, I encountered this issue specifically related to typedefs folder.
According to the Angular upgrade guidelines, it mentions that we need to manually add necessary files.
We have updated the tsconfig.app.json to limit the files compiled. If you rely on other files being included in the compilation, such as a typings.d.ts file, you need to manually add it to the compilation.
For more information on the Angular update, click here.
Link to the GitHub repository for this issue: GitHub Repo
- To resolve this issue, download the repository.
- Run npm install
- Execute ng build