antd-tiny-vue/.vitepress/theme/index.ts
2023-04-16 18:09:13 +08:00

16 lines
444 B
TypeScript

import type { Theme } from 'vitepress'
// eslint-disable-next-line import/no-named-as-default
import DefaultTheme from 'vitepress/theme'
import { AntdTheme } from 'vite-plugin-vitepress-demo/theme'
// @ts-expect-error this is a local module
import Antd from 'antd-tiny-vue'
export default {
...DefaultTheme,
enhanceApp(ctx) {
DefaultTheme.enhanceApp?.(ctx)
ctx.app.component('Demo', AntdTheme)
ctx.app.use(Antd)
}
} as Theme