♻️ Migrating a Blog from Vue to Nuxt

February 28, 2025 (12 days ago)

Blog Web Vitals
🔄

"Same Same But Different", from client-side to server-side rendering: A natural evolution for better web vitals! 🚀

🔗 jugger-rostock.de

A few months ago, I built a Blog/Portfolio app using Vue, fetching external content through APIs. It did the job — but I knew I could squeeze out more SEO performance. The solution? Moving to Nuxt with its built-in SSR magic. 🔥

🤔 Why Migrate to Nuxt?

SEO was the main driver here. Vue's client-side rendering meant search engines didn't always catch dynamic content fetched via APIs. With Nuxt's server-side rendering (SSR), every request generates pre-rendered HTML — making Google and other search engines much happier. 📈

🧌

Clickbait Disclaimer: While Nuxt is awesome, it won't magically fix everything! I still had to manually optimize color contrast ratios, heading hierarchies, and other accessibility goodies. No framework can replace good old-fashioned human attention to detail!

🛠️ The Migration Process

Honestly, the whole process was smoother than expected. Most components were plug-and-play. Having worked a lot with Next.js before, Nuxt's file-based routing felt like second nature.

I did not have to change much in the codebase, but I did have to learn a few new things:

  • Project Setup: Installed Nuxt and set up the folder structure.
  • Routing: Moved components into the pages and components directories. Nuxt automatically handled routes — no extra config needed.
  • Content Fetching: Replaced Vue's lifecycle methods with asyncData and fetch hooks. Now data was ready before rendering.
  • Metadata Management: Used useHead and head() to inject dynamic meta tags for better SEO and Open Graph tags for social media.
  • Build & Deployment: Configured Nuxt for SSR mode and shipped the app as node application to my K3s cluster at Hetzner.

📊 Web Vitals Improvements

Blog Web Vitals

Switching to SSR brought noticeable boosts to a few performance specific Core Web Vitals:

  • Largest Contentful Paint (LCP): Faster first render times with pre-rendered content.
  • Cumulative Layout Shift (CLS): More stable layouts thanks to server-side generated HTML.
  • First Input Delay (FID): Snappier interactions through optimized hydration.

🌟 Final Thoughts

Migrating from Vue to Nuxt was way easier than I expected — and the performance gains were totally worth it. With SSR, filesystem-based routing, and an intuitive developer experience, the whole transition felt like a natural upgrade.

If you're eyeing better SEO and faster load times, Nuxt is absolutely the way to go. 💪

🖥️

Vue.js, Nuxt.js, TypeScript

⚙️

SSR, SEO Optimization, Core Web Vitals

v1.55.0