mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-09-21 01:35:57 +00:00
build(frontend): vendor-chunk charts/pdf/tiptap/monaco
Stabilizes browser cache: changes in dashboard/knowledges/report code no longer invalidate the heavy vendor libs. Side effect: the catch-all (react|react-dom|react-router-dom) regex stopped swallowing @monaco-editor/react and @tiptap/react, so react-vendor drops 469→178 KB. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
1ee2a6f7c9
commit
adddb45158
@@ -77,6 +77,18 @@ export default defineConfig(({ mode }) => {
|
||||
if (/[\\/]@xterm[\\/]/.test(id)) {
|
||||
return 'terminal';
|
||||
}
|
||||
if (/[\\/]recharts[\\/]/.test(id)) {
|
||||
return 'charts';
|
||||
}
|
||||
if (/[\\/]@react-pdf[\\/]/.test(id)) {
|
||||
return 'pdf';
|
||||
}
|
||||
if (/[\\/](monaco-editor|@monaco-editor[\\/]react)[\\/]/.test(id)) {
|
||||
return 'monaco';
|
||||
}
|
||||
if (/[\\/](@tiptap|tiptap-markdown|prosemirror-[a-z-]+)[\\/]/.test(id)) {
|
||||
return 'tiptap';
|
||||
}
|
||||
if (/[\\/](react|react-dom|react-router-dom)[\\/]/.test(id)) {
|
||||
return 'react-vendor';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user