Nuxt & Universal SSR (50 Qs)•Part 3: Advanced Internals, Performance & Production (Senior / Staff)
Explain the Nuxt 3 compilation pipeline and build outputs.
senior LevelCode ExampleFormsPerformancePipes
In Simple Words:
When running nuxi build, Nuxt performs a dual compilation pass orchestrated by Vite and Nitro:
- Client Build (Vite): Compiles Vue components, layouts, pages, and styles into browser-executable JS/CSS chunks stored in
.output/public/_nuxt/. - Server Build (Nitro + Rollup): Bundles server-side Vue templates, server routes (
server/api/), middleware, and Nitro runtime into a self-contained Node/worker bundle in.output/server/index.mjs.
arduino
Source Code (Vue + TS)
│
├──► Vite Client Pass ──► .output/public/_nuxt/ (Static JS/CSS Chunks)
│
└──► Nitro Server Pass ──► .output/server/index.mjs (Zero-dependency engine)