Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use Angular 10 library in Angular 13 application

I have one angular library that is being built in Angular 10.

Now while making a new angular app in Angular 13, we are trying to use that library but it is giving some issues.

I know the compilation has been changed to 100% IVY in Angular 13, but is there any way I can actually use that Angular 10 library in new project

It gives following warning

 Project is attempting to disable the Ivy compiler. Angular versions 12 and higher do not support the deprecated View Engine compiler for applications. The Ivy compiler will be used to build this project. 
    For additional information or if the build fails, please see https://angular.io/guide/ivy

The Error that I get is

(node:41343) UnhandledPromiseRejectionWarning: Error: The target entry-point  has missing dependencies:
like image 331
Sahil Julka Avatar asked Feb 01 '26 10:02

Sahil Julka


1 Answers

I was able to make it work using "postinstall": "ngcc" in Angular 13 consumer app. ngcc makes the library compatible

like image 76
Sahil Julka Avatar answered Feb 03 '26 23:02

Sahil Julka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!