mirror of
https://github.com/hansjone/netx.git
synced 2026-10-12 00:40:44 +08:00
Improve frontend load performance and fix UME/login UX.
Defer topology xyflow and WebCRT xterm until needed, calm idle polling, bake login earth brightness, and let AI alert rules scroll as one natural panel. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
a0170907e4
commit
9bcb8ee0e3
11 changed files with 906 additions and 663 deletions
|
|
@ -4,6 +4,21 @@ import react from '@vitejs/plugin-react'
|
|||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
// Keep heavy optional libs in stable vendor chunks so route opens
|
||||
// don't re-download/parse them mixed into page modules.
|
||||
manualChunks(id) {
|
||||
if (!id.includes('node_modules')) return
|
||||
if (id.includes('@xterm')) return 'vendor-xterm'
|
||||
if (id.includes('@xyflow') || id.includes('dagre')) return 'vendor-topology'
|
||||
if (id.includes('uplot')) return 'vendor-uplot'
|
||||
if (id.includes('@tanstack')) return 'vendor-query'
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue