es-toolkit/docs/.vitepress/theme/index.js
2024-09-12 21:50:54 +09:00

17 lines
477 B
JavaScript

import DefaultTheme from 'vitepress/theme';
import { defineAsyncComponent } from 'vue';
import './index.css';
import CompatibilityStatus from '../components/CompatibilityStatus.vue';
/** @type {import('vitepress').Theme} */
export default {
extends: DefaultTheme,
enhanceApp({ app }) {
app.component(
'Sandpack',
defineAsyncComponent(() => import('../components/Sandpack.vue'))
);
app.component('CompatibilityStatus', CompatibilityStatus);
},
};