This is maybe more a clarification question:
According to the docs for Ivy (since Angular 9) we need to add a postinstall
script into our package.json, which looks like this:
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points"
However, since we're trying to improve our build time (which takes ages since Ivy), I came across an article on entwickler.de (unfortunately in german), mentioning, that since Angular 9.1 we don't need this postinstall script anymore.
However, I cannot find anything in the official docs about omitting this postinstall script...
Would that be a way to potentially speed up the build time?
postinstall
only runs after anpm install
is run, so removing it wouldn't speed up build times (except maybe a build pipeline that rannpm install
every time).According to the Angular glossary What
ngcc
does is:So you should still keep it as a
postinstall
script. What I'm unsure of, though, is the--create-ivy-entry-points
flag, because according to the Angular docs themselves:But that quote also comes under a heading of Angular Shell and Universal. It didn't remove the flag when I upgraded to Angular 10, so I tend to think it's still needed.