InterviewHubPRO
Section Overview
Q220

Question 220 of 283

Part 9: NgModules, Providers, NgZone & Injector Hierarchies (213 - 255)

78%
Angular & Signals (283 Qs)•Part 9: NgModules, Providers, NgZone & Injector Hierarchies (213 - 255)

Is it all components generated in production build?

No, only the entry components and template components appears in production builds. If a component isn't an entry component and isn't found in a template, the tree shaker will throw it away. Due to this reason, make sure to add only true entry components to reduce the bundle size.

Practical Code Example

text
// Are all components generated in production?
// Unused components are tree-shaken and completely removed from the production bundle!