79297990

Date: 2024-12-20 17:35:42
Score: 0.5
Natty:
Report link

There is something we call it Angular’s tree-shaking process

CommonModule provides a collection of commonly used directives (NgIf, NgForOf, NgClass, ...) and pipes (DatePipe, CurrencyPipe, ...) and importing CommonModule means that you get all of these features in your module and this import is usually done at the module level.

but at the end of the day Angular’s tree-shaking process during building for production will generally eliminate unused code, so unused pipes or directives won’t be included in the final bundle.

about the runtime we have lots of overloaded features and data which importing all CommonModule is nothing compare to them :)

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Alireza Einollahi