diff --git a/docs/guide/extending-default-theme.md b/docs/guide/extending-default-theme.md index 5aa6fadb..e58981bf 100644 --- a/docs/guide/extending-default-theme.md +++ b/docs/guide/extending-default-theme.md @@ -115,12 +115,10 @@ import type { Theme } from 'vitepress' import DefaultTheme from 'vitepress/theme' export default { - // ... + extends: DefaultTheme, async enhanceApp({ app }) { - if (!import.meta.env.SSR) { - const plugin = await import('plugin-that-access-window-on-import') - app.use(plugin) - } + // register your custom global components + ctx.app.component('MyGlobalComponent' /* ... */) } } satisfies Theme ```