R
R
raiboon2020-11-20 19:36:22
Angular
raiboon, 2020-11-20 19:36:22

What does ngcc do and why?

I haven't touched Angular for a long time, but now I see something new in the console, that some kind of ngcc compiles modules into different types. I tried googling, but didn't understand anything. Can you explain?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2020-11-20
@raiboon

Ivy applications can be built with libraries that were created with the View Engine compiler. This compatibility is provided by a tool known as the Angular compatibility compiler (ngcc). CLI commands run ngcc as needed when performing an Angular build.
In short, ngcc turns libs for the old angular into libs for the new one. So far, we have a transient process and it is recommended to collect everything for the old one, and then recompile it, which it does automatically.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question