This is your production playbook for Nuxt 4, covering the stuff that breaks when you ship: hydration mismatches, performance bottlenecks, and deployment configs. It walks through the v4 breaking changes (new app directory, shallow reactivity by default, server-first middleware), then digs into practical fixes for common hydration errors like Math.random() or window access on the server. The performance section covers lazy hydration strategies, route caching with SWR and ISR, and image optimization. Testing guidance uses Vitest with @nuxt/test-utils for component and composable testing. Deployment references target Cloudflare Pages, Workers, Vercel, and Netlify with actual config examples. Load this when you're debugging "Hydration node mismatch" errors, optimizing Core Web Vitals, or migrating from v3.

skills.sh installs
425
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill nuxt-production --agent claude-code

Installs into .claude/skills of the current project.

Files

Nuxt 4 Production Guide

Hydration, performance, testing, deployment, and migration patterns.

What's New in Nuxt 4

v4.2 Features (Latest)

1. Abort Control for Data Fetching

const controller = ref<AbortController>()

const { data } = await useAsyncData(
  'users',
  () => $fetch('/api/users', { signal: controller.value?.signal })
)

const abortRequest = () => {
  controller.value?.abort()
  controller.value = new AbortController()
}

2. Async Data Handler Extraction

  • 39% smaller client bundles
  • Data fetching logic extracted to server chunks
  • Automatic optimization (no config needed)

3. Enhanced Error Handling

  • Dual error display: custom error page + technical overlay
  • Better error messages in development

v4.1 Features

1. Enhanced Chunk Stability

  • Import maps prevent cascading hash changes
  • Better long-term caching

2. Lazy Hydration

<script setup>
const LazyComponent = defineLazyHydrationComponent(() =>
  import('./HeavyComponent.vue')
)
</script>

Breaking Changes from v3

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
Frontend Development, Testing & QA, Documentation, Debugging, Cloud & Infrastructure
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1ihlamury avatardribbble-ui-skillsihlamury/design-skillsDribbble's UI design system. Use when building interfaces inspired by Dribbble's aesthetic - light mode, Inter font, 4px grid.413skills.sh installs
2ihlamury avatarnotion-ui-skillsihlamury/design-skillsNotion's UI design system. Use when building interfaces inspired by Notion's aesthetic - light mode, Inter font, 4px grid.402skills.sh installs
3nuxt avatarcontributingnuxt/uiGuide for contributing to Nuxt UI. Provides component structure patterns, Tailwind Variants theming, Vitest testing conventions, and MDC documentation guideline400skills.sh installs
4buildermethods avatarfrontend-designbuildermethods/design-osCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applicat394skills.sh installs
5bobmatnyc avatarvuebobmatnyc/claude-mpm-skillsVue 3 - Progressive JavaScript framework with Composition API, reactivity system, single-file components, Vite integration, TypeScript support390skills.sh installs
6syncfusion avatarsyncfusion-blazor-dataformsyncfusion/blazor-ui-components-skillsImplement Syncfusion Blazor DataForm component for creating dynamic, data-bound forms with validation and field management. Use this when building forms in Blaz382skills.sh installs