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',