Nuxt 5 core framework with project setup, routing, SEO, error handling, and Vite 8/Nitro v3 configuration. Use when creating Nuxt 5 apps, setting up routing, or migrating config.
SKILL.md
Nuxt 5 Core Fundamentals
Project setup, configuration, routing, SEO, and error handling for Nuxt 5 applications.
Note: As of 2026-08-03, Nuxt 5 is not yet stable (current stable line is Nuxt 4.x; see the nuxt-v4 plugin). This skill documents the upcoming Nuxt 5 APIs (Nitro v3, h3 v2, Vite 8/Rolldown). Treat version numbers below as targets, not pinned production releases.
Quick Reference
Version Requirements
Package
Minimum
Recommended
nuxt
5.0.0
5.x
vue
3.5.0
3.5.x
nitro
3.0.0
3.x
vite
8.0.0
8.x
typescript
5.0.0
5.x
Key Commands
bunx nuxi@latest init my-app
bun run dev
bun run build
bun run preview
bun run postinstall
bunx nuxi typecheck
bunx nuxi add page about
bunx nuxi add component MyButton
bunx nuxi add composable useAuth
Secure Installation
Scaffolding tools like bunx nuxi init download and execute remote code. Before running, follow supply chain security best practices:
Block post-install scripts — npm config set ignore-scripts true (or Bun: disabled by default)
Cooldown period — Wait 7 days for new package versions to be vetted by the community
Audit before installing — Run socket package score npm <pkg> or use socket npm install <pkg> to check packages
Load the dependency-upgrade skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.
Nuxt 5 uses the Vite Environment API for environment-specific config. Use configEnvironment and applyToEnvironment instead of separate client/server configs:
// Module/plugin authors - use Vite plugins instead of extendViteConfig
addVitePlugin(() => ({
name: 'my-plugin',
config(config) {
// Global vite configuration
},
configEnvironment(name, config) {
// Environment-specific config
if (name === 'client') {
config.optimizeDeps ||= {}
config.optimizeDeps.include ||= []
config.optimizeDeps.include.push('my-package')
}
},
applyToEnvironment(environment) {
return environment.name === 'client'
},
}))
Optional JSX Support
@vitejs/plugin-vue-jsx is no longer installed by default. Install it only if needed:
bun add -D @vitejs/plugin-vue-jsx
Nuxt will auto-detect .jsx/.tsx files and prompt installation.
// Nuxt 4: clearNuxtState sets state to undefined
// Nuxt 5: clearNuxtState resets state to its initial value
const count = useState('counter', () => 42)
count.value = 100
clearNuxtState('counter')
// Nuxt 5: count.value is now 42 (the default), not undefined