Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
Bundle sizeClient 551.1 kB
Largest changes in the client
And 37 more packages or files. Largest changes in the server
And 49 more packages or files. Brotli sizes. Changes under 100 B are left out of the tables. Initial page load counts the JavaScript and CSS a route loads before it renders. Prerendered URLs count the JavaScript and CSS their HTML preloads (module scripts, modulepreload and stylesheets, not prefetch), and the HTML document. Components are the lazy-loaded components the page rendered: its HTML preloads them, but its route's static imports don't reach them. Measured by nuxt-bundle-analyzer for |
Amp-Thread-ID: https://ampcode.com/threads/T-01a208f9-727e-73e9-9ed5-2765ac3df007 # Conflicts: # layer/package.json # pnpm-lock.yaml
Docus runs on Nuxt Content v3, which v4 replaces with comark-content. #1496 showed that v4's compatibility mode works, but it keeps
content.config.ts,queryCollectionand<ContentRenderer>, which v4 deprecates. This PR moves the layer to pure v4 (compatibilityVersion: 4, server-only, every page prerendered). An app keeps the same config, and its built output stays the same.docus.mode: new option,'prerender'by default and the only mode for now.content.mode: 'server-only'andcontent.compatibilityVersion: 4, and warns when an app sets them differently. Any other mode throws at build time.llms.txt,sitemap.mdandopenapi.jsonare prerendered as today. The server still answers what has to stay dynamic: MCP, the assistant,sitemap.xml,robots.txtand markdown negotiation.server/content.ts, with one source per locale (docs_<locale>,fs('content/<locale>', { prefix: '/<locale>' }), landing page included), or onedocssource oncontent/without i18n. The paths are the same as v3's.z.toJSONSchema(); the layer types its pages from the same object.index.mdleft to an app'sapp/pages/index.vue, siblings of adocs/folder excluded. Nitro gets the same list. This moves tofromBuild()once it lands on nuxt/contentv4.content.config.tsis removed.content.get()replacesqueryCollection, and<ContentDocument>replaces<ContentRenderer>.meta.toc, and titles fall back to the leading h1.llms.txtsection per locale, landing page included, instead of one per v3 collection. The sitemap source readscontent.list().@nuxtjs/mdc,better-sqlite3,zod-to-json-schemaandnuxt-studioare removed, and so are themdcconfig, the layer'soptimizeDepsmodule and theyamlNitro external.shiki(server-side code blocks),comark-contentandrangiare added. The assistant highlights code in its answers with rangi instead of Shiki, as comark-docs does.@nuxt/content4@afe2c56(feat: search content in a web worker withapp/content.worker.tsnuxt/content#3931 on top ofv4),comark-content@ec7a084(comarkdown/comark-content#175, as #3931 pins it), comark atff4661d(main, with feat(plugins): addexternal-linksplugin comarkdown/comark#599 and Define custom aside title #632), and nuxt-agent-discovery584d145(Yaml/Markdown hightlight code #61). They are set as pnpm overrides and as npm overrides intest-starter.sh.AssistantDemobecomesAssistantDemo.lazy.vue. v4 importscomponents/content/statically into<ContentDocument>'s component map, and the landing pages share it with the docs pages, so the demo and the AI SDK were preloaded on every docs page.app/content.worker.tswith the SQLite FTS plugin, andAppSearchreads the current locale's source throughuseNuxtContentWorker()(feat: search content in a web worker withapp/content.worker.tsnuxt/content#3931).onNuxtReady, then every query runs locally. Switching locale loads that locale's snapshot.nuxt generate.appConfig.search.ftsis deprecated, and the configuration page no longer documents Fuse.js.Evidence
Fresh
main(v3) build compared with this branch, Vercel preset, caches deleted before each build:The new smoke test fails on
mainand passes here:JavaScript preloaded per page (module script and modulepreloads, entry included), gzip:
The worker chunk (
content-worker-*.js),sqlite3.wasmand the snapshots aren't preloaded.Search on
nuxt generate, served by a plain static file server, in Chromium:New unit tests cover which sources Docus declares: an app
index.vue, adocs/folder, one source per locale, folder case. Lint, typecheck, unit tests (184), the Vercel output check, the static output check, and both starters throughtest-starter.shpass locally and in CI.On a plain static file server, client navigation, prev/next and switching locale make no
/__nuxt_contentrequest.nuxt devfrom a cold Vite cache hydrates without errors, discovers no dependencies at runtime, and shows markdown edits live.Notes
app/content.worker.tsnuxt/content#3931 merged onv4, and comarkdown/comark-content#172 and feat: nuxt 3 support #175 released.<ContentDocument>imported@comark/vue's index, which also loads<Markdown>, and the assistant really uses<Markdown>, so the bundler kept the parser in a chunk the docs pages share. perf(vue): keep the parser out of defineMarkdownDocumentComponent comarkdown/comark#632 movesdefineMarkdownDocumentComponentnext to<MarkdownDocument>, and the parser now only loads with the assistant. Its commit build is pinned until it's released.comark/renderformatting: padded tables,<http://…>autolinks, empty components on one line. feat(layer): run on nuxt content v4 compat mode #1496 also matched only 9 of 43. One is a real loss: a```textfence losestext. That is to fix in comark or agent-discovery.sitemap.md: the landing pages'Pagesgroup moved from the top to the bottom.github-light/github-dark, as in feat(layer): run on nuxt content v4 compat mode #1496.better-sqlite3throughdb0's optional peer.failOnError, the same way onmain.ELI5
Docus reads your Markdown through Nuxt Content. Nuxt Content is getting a new engine, and this moves Docus onto it without changing the pages your site produces. Search runs in the visitor's browser, so results appear as you type without asking the server.
🤖 Generated with Amp, reviewed by @larbish before opening.