From da9a0b1da7c4cd814ee47b0166c42e14d393cbc4 Mon Sep 17 00:00:00 2001 From: Vuk Marjanovic <71182200+vmrjnvc@users.noreply.github.com> Date: Sat, 11 Jan 2025 22:12:31 +0100 Subject: [PATCH 1/2] fix(nuxt): use `fullPath` instead of empty string in router hmr (#30500) --- packages/nuxt/src/pages/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/pages/module.ts b/packages/nuxt/src/pages/module.ts index b5b7d1b0ac..cfb390f1d6 100644 --- a/packages/nuxt/src/pages/module.ts +++ b/packages/nuxt/src/pages/module.ts @@ -642,7 +642,7 @@ if (import.meta.hot) { for (const route of routes) { router.addRoute(route) } - router.replace('') + router.replace(router.currentRoute.value.fullPath) } if (routes && 'then' in routes) { routes.then(addRoutes) From 9aa4c7c3b19ab5c3247b83c79ddb7b6b53893162 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 11 Jan 2025 21:26:17 +0000 Subject: [PATCH 2/2] chore: add back `nuxi` This reverts commit f0ec3429830f70759971879c174f30e7b5e18e69. --- package.json | 2 +- pnpm-lock.yaml | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b2a897d254..24369eead1 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,6 @@ }, "devDependencies": { "@arethetypeswrong/cli": "0.17.2", - "@nuxt/cli": "3.20.0", "@nuxt/eslint-config": "0.7.5", "@nuxt/kit": "workspace:*", "@nuxt/rspack-builder": "workspace:*", @@ -100,6 +99,7 @@ "markdownlint-cli": "0.43.0", "memfs": "4.17.0", "nitro": "npm:nitro-nightly@3.0.0-beta-28796231.359af68d", + "nuxi": "3.18.2", "nuxt": "workspace:*", "nuxt-content-twoslash": "0.1.2", "ofetch": "1.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f0b8d92bf7..9b51d81a05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,9 +44,6 @@ importers: '@arethetypeswrong/cli': specifier: 0.17.2 version: 0.17.2 - '@nuxt/cli': - specifier: 3.20.0 - version: 3.20.0(magicast@0.3.5) '@nuxt/eslint-config': specifier: 0.7.5 version: 0.7.5(@vue/compiler-sfc@3.5.13)(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3) @@ -140,6 +137,9 @@ importers: nitro: specifier: npm:nitro-nightly@3.0.0-beta-28796231.359af68d version: nitro-nightly@3.0.0-beta-28796231.359af68d(typescript@5.7.3) + nuxi: + specifier: 3.18.2 + version: 3.18.2 nuxt: specifier: workspace:* version: link:packages/nuxt @@ -5807,6 +5807,11 @@ packages: nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + nuxi@3.18.2: + resolution: {integrity: sha512-JKpbXJ5suXSBJxPvosw8eqdJOniNs6RUmi91aaRQG4jmKcDCZgbZIPUBBJNdllCIcrE0jQQO40BfFLxnzx8Ipg==} + engines: {node: ^16.10.0 || >=18.0.0} + hasBin: true + nuxt-content-twoslash@0.1.2: resolution: {integrity: sha512-7vCO04V0uyCXtjh40HgVIVKRReUlXc4efMNMdgDtx3Y7p9mnChRt9eRRD3c8VlDD27pLlkrTTnE2n15bu/SqbQ==} hasBin: true @@ -13581,6 +13586,8 @@ snapshots: dependencies: boolbase: 1.0.0 + nuxi@3.18.2: {} + nuxt-content-twoslash@0.1.2(@nuxtjs/mdc@0.8.3): dependencies: '@nuxt/kit': link:packages/kit