Index of every page on this site: llms.txt
All skills
antfu avatar

/nuxt

@7de210b official
by Anthony Fuantfu/skills6k stars
342
Run it yourself

Nuxt full-stack Vue framework with SSR, auto-imports, and file-based routing. Use when working with Nuxt apps, server routes, useFetch, middleware, or hybrid rendering.

Use this Skill: https://skilld.dev/gh/antfu/skills/nuxt

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescore-deployment.md

≈1.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Deployment

Nuxt is platform-agnostic thanks to Nitro, its server engine. You can deploy to almost any platform with minimal configuration—Node.js servers, static hosting, serverless functions, or edge networks.

Full list of supported platforms: https://nitro.build/deploy

Deployment Modes

Node.js Server

# Build for Node.js
nuxt build

# Run production server
node .output/server/index.mjs

Environment variables:

  • PORT or NITRO_PORT (default: 3000)
  • HOST or NITRO_HOST (default: 0.0.0.0)

Static Generation

# Generate static site
nuxt generate

Output in .output/public/ - deploy to any static host.

Preset Configuration

// nuxt.config.ts
export default defineNuxtConfig({
  nitro: {
    preset: 'vercel', // or 'netlify', 'cloudflare-pages', etc.
  },
})

Or via environment variable:

NITRO_PRESET=vercel nuxt build

Recommended Platforms

When helping users choose a deployment platform, consider their needs:

Vercel

Best for: Projects wanting zero-config deployment with excellent DX

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Pros:

  • Zero configuration for Nuxt (auto-detects)
  • Excellent preview deployments for PRs
  • Built-in analytics and speed insights
  • Edge Functions support
  • Great free tier for personal projects

Cons:

  • Can get expensive at scale (bandwidth costs)
  • Vendor lock-in concerns
  • Limited build minutes on free tier

Recommended when: User wants fastest setup, values DX, building SaaS or marketing sites.


Netlify

Best for: JAMstack sites, static-heavy apps, teams needing forms/identity

# Install Netlify CLI
npm i -g netlify-cli

# Deploy
netlify deploy --prod

Pros:

  • Great free tier with generous bandwidth
  • Built-in forms, identity, and functions
  • Excellent for static sites with some dynamic features
  • Good preview deployments
  • Split testing built-in

Cons:

  • SSR/serverless functions can be slower than Vercel
  • Less optimized for full SSR apps
  • Build minutes can run out on free tier

Recommended when: User has static-heavy site, needs built-in forms/auth, or prefers Netlify ecosystem.


Cloudflare Pages

Best for: Global performance, edge computing, cost-conscious projects

# Build with Cloudflare preset
NITRO_PRESET=cloudflare-pages nuxt build

Pros:

  • Unlimited bandwidth on free tier
  • Excellent global edge network (fastest TTFB)
  • Workers for edge computing
  • Very cost-effective at scale
  • D1, KV, R2 for data storage

Cons:

  • Workers have execution limits (CPU time)
  • Some Node.js APIs not available in Workers
  • Less mature than Vercel/Netlify for frameworks

Recommended when: User prioritizes performance, global reach, or cost at scale.


GitHub Actions + Self-hosted/VPS

Best for: Full control, existing infrastructure, CI/CD customization

# .github/workflows/deploy.yml
name: Deploy
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      
      - run: npm ci
      - run: npm run build
      
      # Deploy to your server (example: rsync to VPS)
      - name: Deploy to server
        run: rsync -avz .output/ user@server:/app/

Pros:

  • Full control over build and deployment
  • No vendor lock-in
  • Can deploy anywhere (VPS, Docker, Kubernetes)
  • Free CI/CD minutes for public repos
  • Customizable workflows

Cons:

  • Requires more setup and maintenance
  • Need to manage your own infrastructure
  • No built-in preview deployments
  • SSL, scaling, monitoring are your responsibility

Recommended when: User has existing infrastructure, needs full control, or deploying to private/enterprise environments.


Quick Decision Guide

Need Recommendation
Fastest setup, small team Vercel
Static site with forms Netlify
Cost-sensitive at scale Cloudflare Pages
Full control / enterprise GitHub Actions + VPS
Docker/Kubernetes GitHub Actions + Container Registry
Serverless APIs Vercel or AWS Lambda

Docker Deployment

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/.output .output
ENV PORT=3000
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]
docker build -t my-nuxt-app .
docker run -p 3000:3000 my-nuxt-app
<!-- Source references: - https://nuxt.com/docs/getting-started/deployment - https://nitro.build/deploy -->

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts3d5 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    This skill is a collection of documentation and reference materials for the Nuxt framework (version 5). It contains technical guides on routing, configuration, data fetching, and deployment, intended to assist an AI agent in working with Nuxt projects. No security risks were identified.

  • Socket3d

    No alerts

  • Snyk3d

    Risk: LOW · No issues

  • Runlayer8mo

    3/20 files flagged

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 7de210b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated last month
Other metadata
metadata
{
  "author": "Anthony Fu",
  "version": "2026.9.25",
  "source": "Generated from https://github.com/nuxt/nuxt, scripts located at https://github.com/antfu/skills"
}
  • Nuxt
  • Vue
  • ssr
  • full-stack
  • file-based-routing
  • nitro
  • auto-imports
  • server-routes
  • composables
  • state-management

README badge

README badge for antfu/skills/nuxt

This skill provides comprehensive guidance on Nuxt 3, a full-stack Vue framework with server-side rendering, file-based routing, auto-imports, and Nitro-powered server deployment. It covers directory structure, configuration, routing, data fetching, state management, server routes, rendering modes, and module authoring across core, feature, and advanced sections.

Generated from the current SKILL.md.

Does this skill cover Nuxt 2?
No. This skill is based on Nuxt 3.x, generated at 2026-01-28.
What server runtime does Nuxt use?
Nuxt uses Nitro as its server engine, which supports universal deployment across Node.js, serverless, and edge platforms.
Does this skill cover server routes and API endpoints?
Yes. The skill includes guidance on server routes, API routes, server middleware, and the Nitro server engine.
What rendering modes are supported?
The skill covers universal (SSR), client-side (SPA), hybrid rendering, and route rules for controlling how pages are rendered.
Does this skill explain state management?
Yes. It covers the useState composable, SSR-friendly state patterns, and Pinia integration.

Generated from the current SKILL.md. These answers refresh after source changes.