Bird
0
0

Which Angular CLI command generates a JSON file useful for bundle size analysis?

easy📝 Syntax Q12 of 15
Angular - Performance Optimization
Which Angular CLI command generates a JSON file useful for bundle size analysis?
Ang build --stats-json
Bng serve --stats-json
Cng test --stats-json
Dng lint --stats-json
Step-by-Step Solution
Solution:
  1. Step 1: Recall Angular CLI commands for building

    The command to build the app and generate stats is ng build --stats-json.
  2. Step 2: Identify correct option

    ng build --stats-json matches the correct command to create the JSON file for bundle analysis.
  3. Final Answer:

    ng build --stats-json -> Option A
  4. Quick Check:

    Build with stats JSON = ng build --stats-json [OK]
Quick Trick: Build command with --stats-json creates analysis file [OK]
Common Mistakes:
  • Using ng serve instead of ng build
  • Confusing test or lint commands with build
  • Forgetting to add --stats-json flag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes