Angular · Senior · Question 70 of 75
How do you analyse which dependencies make the main bundle large?
- ✓Correct answer: Build with
--stats-json(or source maps) and inspect it with a bundle analyzer /source-map-explorer - 2Look at the size of
node_modules - 3Use
ng lint
Explanation
Common culprits are heavy libraries imported eagerly, barrel files pulling in extra code and missing lazy routes or @defer.