|
|
@ -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
|
|
|
|
```
|
|
|
|
```
|
|
|
|