nuxt-productionlisted
Install: claude install-skill secondsky/claude-skills
# Nuxt 5 Production Guide
Hydration, performance, testing, deployment, and migration patterns.
## What's New in Nuxt 5
### v5 Key Changes
| Change | Nuxt 4 | Nuxt 5 |
|--------|--------|--------|
| Bundler | Vite 6 (esbuild + Rollup) | Vite 8 (Rolldown) |
| Server engine | Nitro v2 | Nitro v3 (h3 v2) |
| Server errors | `createError({statusCode})` | `HTTPError({status})` |
| Client-only placeholder | Empty `<div>` | HTML comment node |
| callHook | Always returns Promise | May return void |
| clearNuxtState | Sets to `undefined` | Resets to initial default |
| Page names | Auto-generated | Normalized to route names |
| JSX support | Included by default | Optional (on-demand) |
| externalVue | Configurable | Removed (always mocked) |
### Client-Only Comment Placeholders (v5)
Client-only components (`.client.vue` files and `createClientOnly()` wrappers) now render an HTML comment on the server instead of an empty `<div>`. This fixes scoped styles hydration issues.
```vue
<!-- If you relied on the placeholder <div> for layout -->
<ClientOnly>
<MyComponent />
<template #fallback>
<div class="placeholder" style="min-height: 200px"></div>
</template>
</ClientOnly>
```
To revert to the old `<div>` behavior:
```typescript
// nuxt.config.ts
export default defineNuxtConfig({
experimental: {
clientNodePlaceholder: false
}
})
```
### Non-Async callHook (v5)
`callHook` may now return `void` instead of always returning `Promise`. Always use `await`:
```typescr