// https://vitepress.dev/guide/custom-theme import type { Theme } from "vitepress"; import DefaultTheme from "vitepress/theme"; import ElementPlus from 'element-plus' import CustomLayout from "../../components/CustomLayout.vue"; import i18n from "../../plugins/i18n"; import 'element-plus/dist/index.css' import "./style.css"; import "./custom-doc.scss"; export default { extends: DefaultTheme, Layout: CustomLayout, enhanceApp({ app, router, siteData }) { // NOTE polyfill `process` for library `path-browserify`,@SEE: https://github.com/browserify/path-browserify/issues/34 if (!import.meta.env.SSR) { import('process/browser').then((module) => { globalThis.process = module }) } app.use(i18n); app.use(ElementPlus) // ... }, } satisfies Theme;