From d8953f7644721ab70f186e20888e23c646272dff Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 7 Jan 2026 13:41:24 +0000 Subject: [PATCH] Upgrade from Nuxt 2 to Nuxt 3 Major changes: - Upgrade nuxt from 2.18.1 to 3.14.159 - Upgrade @nuxt/content from v1 to v2 - Replace @nuxtjs/pwa with @vite-pwa/nuxt - Update @nuxtjs/tailwindcss to v6 - Replace Nuxt 2 build modules with Nuxt 3 modules - Update all Vue components to use Composition API with script setup - Convert pages to use Nuxt 3 composables (useAsyncData, queryContent) - Update nuxt.config.js to use defineNuxtConfig - Rename dynamic route from _slug.vue to [slug].vue - Replace with - Replace with in layout - Update all nuxt-link references to NuxtLink - Add .output to .gitignore for Nuxt 3 build output - Migrate from .eslintrc.js to eslint.config.js for ESLint 9 --- .gitignore | 1 + components/ArticleCard.vue | 34 +- components/ArticleTag.vue | 18 +- components/SideBar.vue | 55 +- eslint.config.js | 74 + layouts/default.vue | 64 +- nuxt.config.js | 91 +- package-lock.json | 29885 +++++++++++++++++------------------ package.json | 27 +- pages/about.vue | 15 +- pages/blog/[slug].vue | 30 + pages/blog/_slug.vue | 33 - pages/index.vue | 57 +- 13 files changed, 14710 insertions(+), 15674 deletions(-) create mode 100644 eslint.config.js create mode 100644 pages/blog/[slug].vue delete mode 100644 pages/blog/_slug.vue diff --git a/.gitignore b/.gitignore index e8f682b..53e055e 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ typings/ # nuxt.js build output .nuxt +.output # Nuxt generate dist diff --git a/components/ArticleCard.vue b/components/ArticleCard.vue index 0a427c1..07971a9 100644 --- a/components/ArticleCard.vue +++ b/components/ArticleCard.vue @@ -1,17 +1,17 @@ -