@vuepress/plugin-catalog
Version:
VuePress plugin - catalog
14 lines (13 loc) • 539 B
JavaScript
import { hasGlobalComponent } from '@vuepress/helper/client';
import { defineClientConfig } from 'vuepress/client';
import Catalog from './components/Catalog.js';
import { injectCatalogInfoGetter } from './helpers/index.js';
import './styles/vars.css';
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
export default defineClientConfig({
enhance: ({ app }) => {
injectCatalogInfoGetter(app);
if (!hasGlobalComponent('Catalog', app))
app.component('Catalog', Catalog);
},
});