Migration
08-25-2025
7 min read

Nuxt 2 to Nuxt 3 Migration Playbook for SaaS Teams

A no-fluff guide for SaaS teams migrating from Nuxt 2 legacy apps to Nuxt 3. Covers risks, trade-offs, code shifts, and a phased playbook.

By Michal Klak
Nuxt 2 to Nuxt 3 Migration Playbook for SaaS Teams

Nuxt 2 → Nuxt 3 Migration Playbook for SaaS

Migrating a SaaS product from Nuxt 2 legacy to Nuxt 3 is not optional anymore-it's survival.
This guide is for SaaS teams, CTOs, and senior FE devs who need a clear plan, not theory.

Assumption: Node 18+, Vite build, Pinia instead of Vuex, and modern hosting (Vercel/Netlify or Dockerized VPS).

Business Impact

  • Risk: Nuxt 2 is effectively end-of-life. Security updates are gone. Every week you delay is compounding tech debt.
  • Opportunity: Nuxt 3 gives serverless-ready Nitro, native TypeScript, better DX, and Core Web Vitals uplift.
  • Costs vs Value: Expect 4-8 weeks migration for a mid-size SaaS (~50 routes). Payoff: lower infra costs, faster builds, +10-15% Lighthouse performance.

Pro Tip

If your production build takes >5 minutes or SSR cold starts >1s-migration isn’t optional. It’s urgent.

Technical Breakdown

Key differences:

  • Config: nuxt.config.jsnuxt.config.ts with defineNuxtConfig.
  • State: Vuex → Pinia.
  • Server: serverMiddleware → Nitro server/api/*.
  • Build: Webpack → Vite.
  • Routing: File-based stays, but middleware/plugin APIs changed.
  • SEO: Native support for route rules + payload extraction.

Example: Config Rewrite

      
    

Example: API Endpoint Migration

      
    

Pro Tip

Wrap all new API routes with input validation (e.g., Zod). Prevents leaking legacy bugs into Nuxt 3.

Migration Checklist

Inventory all Vuex stores and design their Pinia equivalents.

Audit all Nuxt 2 plugins and middleware. Flag those using deprecated context injection.

Verify external integrations (Auth0, Stripe, CMS). Replace serverMiddleware with Nitro handlers.

Confirm build pipelines support Node 18+ and Vite (CI/CD updates).

Run Lighthouse against staging. Compare TTFB, LCP, and CLS before/after.

Check canonical URLs + 301s for dynamic routes after migration.

Pitfalls to Avoid

Warning

Do not attempt a big-bang migration without a feature freeze and green CI. Freeze new features until Nuxt 3 is stable in staging.

Warning

Avoid copying old webpack configs into Nuxt 3. Most don’t translate. Strip to minimal and rebuild.

Phased Playbook

  1. Audit (Week 1)
    • List routes, plugins, middleware.
    • Estimate effort for Vuex→Pinia, middleware rewrites.
  2. Parallel Branch (Week 2)
    • Keep Nuxt 2 branch alive. Start Nuxt 3 branch.
    • Migrate config + basic layout.
  3. Core Features (Weeks 3-4)
    • Move state, critical APIs, auth.
    • Run e2e + API tests.
  4. SEO + Perf (Week 5)
    • Add routeRules, ISR/prerender.
    • Benchmark CWV.
  5. Cutover (Week 6)
    • Staged rollout. Monitor error rates.
    • Kill Nuxt 2 branch when stable.

Pro Tip

Always run both Nuxt 2 and Nuxt 3 branches in parallel until you’ve done a live traffic test.

SEO & Performance Notes

  • Core Web Vitals: Nuxt 3 reduces CLS and LCP by default with Vite and payload extraction.
  • SSR/ISR: Use routeRules for hybrid SSR + prerender.
  • Caching: Edge caching via Nitro presets (Vercel, Cloudflare).
  • Routes: Ensure canonical URLs and trailing slash rules match legacy.

Example: Route Rules for SEO

      
    

Conclusion

Migrating from Nuxt 2 legacy to Nuxt 3 is an audit + rebuild, not a patch.
Done right, you get faster builds, modern SSR, and SEO uplift.
Delay it, and you’re sitting on a liability.

Share this article:

Get your Nuxt 2 audit

Full code analysis in 48 hours

Comprehensive audit with risk assessment and migration roadmap

Fixed price - no surprises

$499 audit with transparent pricing and no hidden fees

Expert migration guidance

Tailored recommendations for your specific Nuxt 2 codebase

Need technical support or have questions?

Contact support →

Tell us about your project

You can also email us at hello@nunuqs.com