From 67406965474e521cef3f3928805268943c6aee90 Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 22 Apr 2025 16:47:39 +0800 Subject: [PATCH] Add makrdown/mermaid module to manual chunks --- lightrag_webui/vite.config.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lightrag_webui/vite.config.ts b/lightrag_webui/vite.config.ts index e6c83567..52030dc4 100644 --- a/lightrag_webui/vite.config.ts +++ b/lightrag_webui/vite.config.ts @@ -32,7 +32,19 @@ export default defineConfig({ // Separate feature modules 'feature-graph': ['./src/features/GraphViewer'], 'feature-documents': ['./src/features/DocumentManager'], - 'feature-retrieval': ['./src/features/RetrievalTesting'] + 'feature-retrieval': ['./src/features/RetrievalTesting'], + + // Mermaid-related modules + 'mermaid-vendor': ['mermaid'], + + // Markdown-related modules + 'markdown-vendor': [ + 'react-markdown', + 'rehype-react', + 'remark-gfm', + 'remark-math', + 'react-syntax-highlighter' + ] }, // Ensure consistent chunk naming format chunkFileNames: 'assets/[name]-[hash].js',