From 96b2054ecd5dc662015bdde4b614f8644b21b93e Mon Sep 17 00:00:00 2001 From: Djeex Date: Sat, 5 Sep 2026 23:58:45 +0200 Subject: [PATCH] Force admonition components global so the build stops dropping them --- nuxt.config.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nuxt.config.ts b/nuxt.config.ts index 3f6e06d..463ea7b 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -24,6 +24,18 @@ function getContributors(absoluteFilePath: string): string[] { export default defineNuxtConfig({ extends: ['docus'], + components: [ + // ProseNote/Tip/Warning/Caution are only ever resolved dynamically, by + // name, from Nuxt Content's MDC tag map (`note` -> `ProseNote`, etc.). + // Nothing statically imports or writes `` in a template, so + // Vite's production build can't see them as used and tree-shakes them + // out of both the client and server bundles entirely: every admonition + // then renders as a raw, unstyled `` tag instead of the + // actual callout. Marking this folder global forces them into the + // bundle regardless. `nuxt dev` never hits this: it serves components + // on demand and doesn't tree-shake. + { path: '~/app/components/prose', pathPrefix: false, global: true }, + ], modules: ['@nuxtjs/i18n'], site: { url: 'https://docu.djeex.fr',