Skip to main content
InterviewHubPRO
Section Overview
Q30

Question 30 of 50

Part 3: Advanced Internals, Performance & Production (Senior / Staff)

60%
Nuxt & Universal SSR (50 Qs)•Part 3: Advanced Internals, Performance & Production (Senior / Staff)

How do you optimize bundle size and analyze dependencies in Nuxt?

senior LevelFormsPerformanceVue & Nuxt

In Simple Words:

  1. nuxi analyze: Runs Rollup/Vite visualizer to identify bloated dependencies in both client and server bundles.
  2. Component Prefixing & Shaking: Keep components in focused subdirectories so only referenced UI parts are bundled.
  3. Dynamic Import of Heavy Modules: Use dynamic import() or async components for non-critical dialogs and heavy charting engines.
  4. Font Optimization: Use @nuxtjs/fontaine to eliminate layout shift (CLS) and @nuxtjs/google-fonts to download fonts locally.