nuxt-production

Solid

Nuxt 5 production optimization: hydration, performance, testing with Vitest, deployment to Cloudflare/Vercel/Netlify, and migration from Nuxt 4. Use when: debugging hydration mismatches, optimizing performance and Core Web Vitals, writing tests with Vitest, deploying to Cloudflare Pages/Workers/Vercel/Netlify, or migrating from Nuxt 4 to Nuxt 5. Keywords: hydration, hydration mismatch, ClientOnly, SSR, performance, lazy loading, lazy hydration, Vitest, testing, deployment, Cloudflare Pages, Cloudflare Workers, Vercel, Netlify, NuxtHub, migration, Nuxt 4 to Nuxt 5, Rolldown, Vite 8, Nitro v3, comment placeholder

Web & Frontend 168 stars 27 forks Updated 4 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
7 months ago
Last Updated
4 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category