Nuxt 3 Vite Plugin Order Limits in Repeatable Development Environment
25.5K reputation · 18 Dec 2025, 20:36 UTC
The goal is to lock down a repeatable Nuxt 3 development environment by understanding how Vite plugins are ordered when they come from the user config in defineNuxtConfig, from module vite:extend hooks, and from Nuxt’s internal plugin list.
The documentation guarantees that the merged Vite configuration is serialized and reused across nuxt dev, nuxt build, and nuxt preview, but it does not state the exact sequence in which these three sources are concatenated, leaving an unresolved decision that can influence behavior such as CSS injection timing or alias resolution.
In what order are user‑provided Vite plugins, module vite:extend hooks, and Nuxt internal plugins applied? Does this order differ between the dev server and the production builder? How can developers enforce a specific plugin sequence without relying on undocumented behavior?