Files
docs/plugins/docuservix/index.ts
T

32 lines
824 B
TypeScript

import path from 'path';
import type { LoadContext, Plugin } from '@docusaurus/types';
export default function docuservix() {
return function pluginDocuservix(_context: LoadContext): Plugin {
return {
name: 'docuservix',
configureWebpack() {
return {
resolve: {
alias: {
'@docuservix': path.resolve(__dirname),
},
},
};
},
async contentLoaded({ actions }) {
const { addRoute } = actions;
addRoute({
path: '/chat',
component: '@docuservix/pages/chat',
exact: true,
});
},
};
};
}