Bird
0
0

You notice your Angular bundle is very large. Which combination of actions will best reduce the bundle size?

hard📝 state output Q15 of 15
Angular - Performance Optimization
You notice your Angular bundle is very large. Which combination of actions will best reduce the bundle size?
ADisable Ahead-of-Time compilation and enable source maps
BUse lazy loading for modules and remove unused imports
CAdd more third-party libraries and increase polyfills
DIncrease the number of components and services
Step-by-Step Solution
Solution:
  1. Step 1: Identify techniques to reduce bundle size

    Lazy loading loads modules only when needed, and removing unused imports cuts unnecessary code.
  2. Step 2: Evaluate options for reducing size

    Use lazy loading for modules and remove unused imports correctly combines these effective methods. Other options add size or disable optimizations.
  3. Final Answer:

    Use lazy loading for modules and remove unused imports -> Option B
  4. Quick Check:

    Lazy loading + clean imports = smaller bundle [OK]
Quick Trick: Lazy load and clean imports to shrink bundle [OK]
Common Mistakes:
  • Adding more libraries increases size
  • Disabling AOT slows app and increases size
  • Adding components without optimization

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes