From fcd7521a468e9de0f5b75cd43b3a1ddbfbf498f1 Mon Sep 17 00:00:00 2001 From: Baptiste Leproux Date: Thu, 19 Nov 2026 20:55:42 +0000 Subject: [PATCH 1/3] chore: fix dev:prepare warnings Amp-Thread-ID: https://ampcode.com/threads/T-01a1f58d-f9d7-7290-9c8a-01f7ba8304bf --- .nuxtrc | 2 -- layer/.nuxtrc | 2 ++ playground/nuxt.config.ts | 6 +++--- playground/package.json | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 .nuxtrc create mode 100644 layer/.nuxtrc diff --git a/.nuxtrc b/.nuxtrc deleted file mode 100644 index 6ad173a7b..000000000 --- a/.nuxtrc +++ /dev/null @@ -1,2 +0,0 @@ -# Enable i18n types in layer folder -modules[]=@nuxtjs/i18n \ No newline at end of file diff --git a/layer/.nuxtrc b/layer/.nuxtrc new file mode 100644 index 000000000..ecd34c71a --- /dev/null +++ b/layer/.nuxtrc @@ -0,0 +1,2 @@ +# Dev-only (not published): gives nuxt-llms a domain when preparing the layer alone +site.url=https://docus.dev diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index 262ea296e..274453e5d 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -1,11 +1,11 @@ export default defineNuxtConfig({ + site: { + url: 'https://docus.dev', + }, docus: { assistant: { enabled: Boolean(process.env.MISTRAL_API_KEY), apiPath: '/api/assistant', }, }, - - // Explicitly disable i18n for playground testing (enabled by .nuxtrc) - i18n: false, }) diff --git a/playground/package.json b/playground/package.json index dde69559a..45a120582 100644 --- a/playground/package.json +++ b/playground/package.json @@ -1,5 +1,6 @@ { "name": "playground", + "type": "module", "scripts": { "dev": "nuxt dev --extends docus", "build": "nuxt build --extends docus" From 0539cd31b27b63e532b1166ac013dea94dc78e8b Mon Sep 17 00:00:00 2001 From: Baptiste Leproux Date: Thu, 19 Nov 2026 21:05:03 +0000 Subject: [PATCH 2/3] chore(deps): scope h3 override to v1 Amp-Thread-ID: https://ampcode.com/threads/T-01a1f58d-f9d7-7290-9c8a-01f7ba8304bf --- pnpm-lock.yaml | 58 +++++++++++++++++++++++++++++++++++++-------- pnpm-workspace.yaml | 3 ++- 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 46e5ed5a1..356b1ed17 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -163,7 +163,7 @@ settings: excludeLinksFromLockfile: false overrides: - h3: 1.15.11 + h3@1: 1.15.11 ai: ^7.0.177 '@ai-sdk/vue': ^4.0.177 '@ai-sdk/gateway': ^4.0.150 @@ -183,7 +183,7 @@ importers: version: 1.2.99 '@nuxt/eslint': specifier: ^1.17.0 - version: 1.17.0(@nuxt/schema@4.6.4)(@typescript-eslint/utils@8.73.0(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(@vue/compiler-sfc@3.5.45)(confbox@0.3.2)(dotenv@17.4.2)(esbuild@0.28.2)(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.5)(oxc-parser@0.154.0)(rolldown@1.2.19)(rollup@4.68.5)(srvx@1.0.8)(supports-color@10.2.2)(typescript@6.0.3)(unplugin@3.7.0(esbuild@0.28.2)(rolldown@1.2.19)(rollup@4.68.5)(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)))(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 1.17.0(@nuxt/schema@4.6.4)(@typescript-eslint/utils@8.73.0(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(@vue/compiler-sfc@3.5.45)(confbox@0.3.2)(crossws@0.4.17(srvx@1.0.8))(dotenv@17.4.2)(esbuild@0.28.2)(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.5)(oxc-parser@0.154.0)(rolldown@1.2.19)(rollup@4.68.5)(srvx@1.0.8)(supports-color@10.2.2)(typescript@6.0.3)(unplugin@3.7.0(esbuild@0.28.2)(rolldown@1.2.19)(rollup@4.68.5)(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)))(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) '@nuxt/eslint-config': specifier: ^1.17.0 version: 1.17.0(@typescript-eslint/utils@8.73.0(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(@vue/compiler-sfc@3.5.45)(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) @@ -5481,6 +5481,19 @@ packages: h3@1.15.11: resolution: {integrity: sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==} + h3@2.0.8: + resolution: {integrity: sha512-ENuKlF9kC6E6PrvY1PUyE0qkrnnPTIt2/v48uyEEfTVfgoiqBCE0uwwf++2XrWwT1gxjQBDLQ8PAsmZVniKvTw==} + engines: {node: '>=20.19.0'} + hasBin: true + peerDependencies: + crossws: ^0.4.12 + ocache: '>=0.3.0' + peerDependenciesMeta: + crossws: + optional: true + ocache: + optional: true + has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} @@ -7235,6 +7248,10 @@ packages: rou3@0.9.2: resolution: {integrity: sha512-3SOzvaAg8rkHrXtRjpCvCvbyO5to9oOO27Z/XqHEYXfMRVSw/qMIVdmaOk9W2lcRLtR6dlqTjo9hDeJk70QBYQ==} + rou3@1.0.0: + resolution: {integrity: sha512-ySeaQkSrua+ut9g+65I7FHqOFBaY8tV0FmccXItoq0q21se32Q3u4YiW7/RqXSosWgYJaaKwRHXy3BST9PeCNQ==} + engines: {node: '>=20.19.0'} + router@2.3.0: resolution: {integrity: sha512-bpowRfGjEPe8t9R6fJIzhwmyCGAXwKvxBUsgJm+bJukwdcWmUXbMo7p22w7aYmQBPQTUMNqMV39YX0kMou3z8w==} engines: {node: '>= 18'} @@ -8808,13 +8825,16 @@ snapshots: '@decimalturn/toml-patch@3.3.3': {} - '@devframes/agentic@1.3.5(devframe@1.3.5)': + '@devframes/agentic@1.3.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.3.5)': dependencies: '@modelcontextprotocol/client': 2.4.0 '@modelcontextprotocol/server': 2.4.0 devframe: 1.3.5(@devframes/agentic@1.3.5)(cac@7.1.0)(srvx@1.0.8) - h3: 1.15.11 + h3: 2.0.8(crossws@0.4.17(srvx@1.0.8)) pathe: 2.0.3 + transitivePeerDependencies: + - crossws + - ocache '@dxup/nuxt@0.5.11(@nuxt/schema@4.6.4)(confbox@0.2.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(jiti@2.7.0)(mlly@1.8.2)(oxc-parser@0.154.0)(rolldown@1.2.19)(rollup@4.68.5)(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': dependencies: @@ -9140,9 +9160,9 @@ snapshots: dependencies: '@eslint/core': 1.2.1 - '@eslint/config-inspector@3.5.0(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(srvx@1.0.8)': + '@eslint/config-inspector@3.5.0(crossws@0.4.17(srvx@1.0.8))(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(srvx@1.0.8)': dependencies: - '@devframes/agentic': 1.3.5(devframe@1.3.5) + '@devframes/agentic': 1.3.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.3.5) ansis: 4.5.0 cac: 7.1.0 chokidar: 5.0.0 @@ -9151,6 +9171,8 @@ snapshots: jiti: 2.7.0 tinyglobby: 0.2.17 transitivePeerDependencies: + - crossws + - ocache - srvx '@eslint/core@1.2.1': @@ -10403,9 +10425,9 @@ snapshots: - supports-color - typescript - '@nuxt/eslint@1.17.0(@nuxt/schema@4.6.4)(@typescript-eslint/utils@8.73.0(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(@vue/compiler-sfc@3.5.45)(confbox@0.3.2)(dotenv@17.4.2)(esbuild@0.28.2)(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.5)(oxc-parser@0.154.0)(rolldown@1.2.19)(rollup@4.68.5)(srvx@1.0.8)(supports-color@10.2.2)(typescript@6.0.3)(unplugin@3.7.0(esbuild@0.28.2)(rolldown@1.2.19)(rollup@4.68.5)(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)))(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': + '@nuxt/eslint@1.17.0(@nuxt/schema@4.6.4)(@typescript-eslint/utils@8.73.0(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(@vue/compiler-sfc@3.5.45)(confbox@0.3.2)(crossws@0.4.17(srvx@1.0.8))(dotenv@17.4.2)(esbuild@0.28.2)(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.5)(oxc-parser@0.154.0)(rolldown@1.2.19)(rollup@4.68.5)(srvx@1.0.8)(supports-color@10.2.2)(typescript@6.0.3)(unplugin@3.7.0(esbuild@0.28.2)(rolldown@1.2.19)(rollup@4.68.5)(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)))(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': dependencies: - '@eslint/config-inspector': 3.5.0(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(srvx@1.0.8) + '@eslint/config-inspector': 3.5.0(crossws@0.4.17(srvx@1.0.8))(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(srvx@1.0.8) '@nuxt/devtools-kit': 3.4.4(@nuxt/schema@4.6.4)(confbox@0.3.2)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.5)(mlly@1.8.2)(oxc-parser@0.154.0)(rolldown@1.2.19)(unplugin@3.7.0(esbuild@0.28.2)(rolldown@1.2.19)(rollup@4.68.5)(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)))(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) '@nuxt/eslint-config': 1.17.0(@typescript-eslint/utils@8.73.0(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(@vue/compiler-sfc@3.5.45)(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) '@nuxt/eslint-plugin': 1.17.0(eslint@10.15.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3) @@ -10429,6 +10451,7 @@ snapshots: - '@vue/compiler-sfc' - bun-types-no-globals - confbox + - crossws - dotenv - esbuild - eslint-import-resolver-node @@ -10436,6 +10459,7 @@ snapshots: - giget - jiti - magic-string + - ocache - oxc-parser - rolldown - rollup @@ -10500,6 +10524,7 @@ snapshots: - jiti - magic-string - mlly + - ocache - oxc-parser - postcss - rolldown @@ -10563,6 +10588,7 @@ snapshots: - jiti - magic-string - mlly + - ocache - oxc-parser - postcss - rolldown @@ -11386,6 +11412,7 @@ snapshots: - nitro - nitropack - nprogress + - ocache - oxc-parser - postcss - qrcode @@ -11521,6 +11548,7 @@ snapshots: - nitro - nitropack - nprogress + - ocache - oxc-parser - postcss - qrcode @@ -14541,13 +14569,14 @@ snapshots: devframe@1.3.5(@devframes/agentic@1.3.5)(cac@7.1.0)(srvx@1.0.8): dependencies: crossws: 0.4.17(srvx@1.0.8) - h3: 1.15.11 + h3: 2.0.8(crossws@0.4.17(srvx@1.0.8)) nostics: 1.4.0 pathe: 2.0.3 optionalDependencies: - '@devframes/agentic': 1.3.5(devframe@1.3.5) + '@devframes/agentic': 1.3.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.3.5) cac: 7.1.0 transitivePeerDependencies: + - ocache - srvx devlop@1.1.0: @@ -15350,6 +15379,13 @@ snapshots: ufo: 1.6.4 uncrypto: 0.1.3 + h3@2.0.8(crossws@0.4.17(srvx@1.0.8)): + dependencies: + rou3: 1.0.0 + srvx: 1.0.8 + optionalDependencies: + crossws: 0.4.17(srvx@1.0.8) + has-property-descriptors@1.0.2: dependencies: es-define-property: 1.0.1 @@ -18606,6 +18642,8 @@ snapshots: rou3@0.9.2: {} + rou3@1.0.0: {} + router@2.3.0(supports-color@10.2.2): dependencies: debug: 4.4.3(supports-color@10.2.2) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0b13b7e24..db7fd118a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -6,7 +6,8 @@ packages: - playground overrides: - h3: 1.15.11 + # devframe (via @nuxt/fonts) needs h3 v2. + h3@1: 1.15.11 ai: ^7.0.177 '@ai-sdk/vue': ^4.0.177 '@ai-sdk/gateway': ^4.0.150 From af8b7ac7b3d97208b79e7df814a12dc7aaa5e398 Mon Sep 17 00:00:00 2001 From: Baptiste Leproux Date: Thu, 19 Nov 2026 21:23:21 +0000 Subject: [PATCH 3/3] fix(layer): pre-bundle comark deps to avoid dev reloads Amp-Thread-ID: https://ampcode.com/threads/T-01a1f58d-f9d7-7290-9c8a-01f7ba8304bf --- docs/nuxt.config.ts | 6 ++++++ layer/nuxt.config.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/docs/nuxt.config.ts b/docs/nuxt.config.ts index 3a6c3a29d..23a5b08e1 100644 --- a/docs/nuxt.config.ts +++ b/docs/nuxt.config.ts @@ -10,6 +10,12 @@ export default defineNuxtConfig({ }, }, compatibilityDate: '2025-07-18', + vite: { + optimizeDeps: { + // Imported by `AssistantDemo.vue` and the Vercel plugin, found too late by Vite's scan. + include: ['@ai-sdk/vue', 'ai', '@vercel/analytics', '@vercel/speed-insights'], + }, + }, agentDiscovery: { excludePrefixes: { // Nuxt Studio, a Vue page tree with no markdown twin diff --git a/layer/nuxt.config.ts b/layer/nuxt.config.ts index 026ac18fa..4db73c9fe 100644 --- a/layer/nuxt.config.ts +++ b/layer/nuxt.config.ts @@ -36,6 +36,8 @@ export default defineNuxtConfig({ config.optimizeDeps ||= {} config.optimizeDeps.include ||= [] config.optimizeDeps.include.push('@nuxt/content > slugify') + // `AssistantComark` is always registered, so Vite otherwise finds these on first render and reloads the page. + config.optimizeDeps.include.push('docus > @comark/vue', 'docus > @comark/vue/plugins/shiki') config.optimizeDeps.include = config.optimizeDeps.include .map(id => id.replace(/^@nuxt\/content > /, 'docus > @nuxt/content > '))