Nuxt implementation checklist
This checklist ensures your Nuxt application is optimized for performance, security, and scalability before deployment to production environments such as Vercel, Netlify, or self-hosted Docker containers.
Performance and Rendering
0/5Enable Payload Extraction
recommendedVerify that 'experimental.payloadExtraction' is set to true in nuxt.config.ts to reduce the size of the initial HTML response.
Implement Nuxt Image
criticalReplace standard <img> tags with <NuxtImg> to enable automatic resizing, WebP conversion, and lazy loading.
Analyze Bundle Sizes
recommendedRun 'npx nuxi analyze' to identify large third-party dependencies and replace them with smaller alternatives or move them to server-only modules.
Configure Route Rules
criticalDefine SWR (Stale-While-Revalidate) or ISR (Incremental Static Regeneration) rules in nuxt.config.ts for high-traffic dynamic pages.
Optimize Font Loading
recommendedUse @nuxtjs/google-fonts with 'download: true' to host fonts locally and prevent layout shifts (CLS).
Security and Environment
0/5Validate Environment Variables
criticalUse a validation schema (e.g., Zod) within a nitro plugin to ensure all NUXT_PUBLIC_* and NUXT_PRIVATE_* variables are present at runtime.
Install Nuxt Security Module
criticalConfigure 'nuxt-security' to automatically apply CSP headers, CORS policies, and Rate Limiting to server routes.
Sanitize Server Routes
criticalVerify that all /server/api routes use readBody() or getQuery() with input validation to prevent injection attacks.
Disable Production DevTools
recommendedEnsure 'devtools: { enabled: false }' is explicitly set or conditionally disabled for production builds.
Restrict Public Assets
criticalAudit the /public folder to ensure no sensitive configuration files, .env backups, or private keys are exposed.
Data Fetching and State
0/5Unique useFetch Keys
criticalEnsure every manually keyed useFetch or useAsyncData call has a unique string key to prevent hydration mismatches during SSR.
Pinia Server-Side State
criticalVerify that Pinia stores are initialized within the setup function to prevent state cross-contamination between different user requests.
Handle Fetch Errors
recommendedImplement 'fatal: true' in createError calls within fetch blocks to force a redirect to the error page when critical data fails.
Lazy Loading Data
optionalUse useLazyFetch for non-critical UI components to prevent blocking the initial page navigation.
Cache API Responses
recommendedUse Nitro's 'useStorage' or 'defineCachedEventHandler' to cache expensive database queries or external API calls.
SEO and Meta Management
0/5Dynamic Meta Tags
criticalUse useSeoMeta() in every page component to define unique titles, descriptions, and Open Graph images.
Sitemap Generation
recommendedConfigure @nuxtjs/sitemap to automatically crawl routes and include dynamic slugs from your CMS or database.
Robots.txt Configuration
recommendedAdd @nuxtjs/robots to prevent indexing of staging environments and private admin routes.
Canonical URL Implementation
recommendedVerify that useHead() includes a canonical link tag to prevent duplicate content penalties from search engines.
Structured Data
optionalInject JSON-LD scripts using useHead for product, article, or organization schemas to improve rich snippet visibility.
Error Handling and Logging
0/5Global Error Page
criticalCreate a custom error.vue in the root directory to handle 404 and 500 errors with a user-friendly UI.
Sentry Integration
recommendedConfigure Sentry or a similar observability tool to capture both client-side Vue errors and server-side Nitro errors.
Hydration Mismatch Audit
criticalRun the build in a staging environment and check the browser console for hydration mismatches that could break interactivity.
Structured Server Logs
optionalEnsure Nitro server logs are outputting in JSON format for easier ingestion by log management platforms like Datadog or Logtail.
Route Middleware Guards
criticalVerify that auth middleware correctly redirects unauthenticated users before the page component begins mounting.
Deployment and CI/CD
0/5Nitro Preset Selection
criticalExplicitly set the 'NITRO_PRESET' environment variable (e.g., vercel, netlify, or node-server) to match your hosting provider.
Prisma/Drizzle Migration Check
criticalInclude a database migration step in your CI/CD pipeline before the 'nuxt build' command executes.
Health Check Endpoint
recommendedCreate a /server/api/health.ts route that returns a 200 status to allow load balancers to monitor instance readiness.
Brotli Compression
recommendedEnsure the hosting provider or reverse proxy (Nginx) is configured to serve .mjs and .css files with Brotli compression.
Source Map Generation
optionalDisable production source maps in nuxt.config.ts unless they are specifically required for your error reporting service.