docs: update types for theme config (#3118)

* docs: update types for theme config
pull/3122/head
Joaquín Sánchez 1 year ago committed by GitHub
parent 71bed58936
commit 5542f29569
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save