mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
fix(ui): pre-bundle echarts subpaths to stop dev-server 504 re-optimization
This commit is contained in:
parent
b3e8d1e283
commit
7b053052d7
@ -33,6 +33,20 @@ export default defineConfig({
|
||||
'@': resolve(__dirname, 'src'),
|
||||
},
|
||||
},
|
||||
// echarts is consumed via subpath modules (echarts/core, echarts/charts, …)
|
||||
// that only the route-lazy Dashboard and Wiki graph views import. Vite's
|
||||
// startup dep scan never sees these subpaths, so it re-optimizes the first
|
||||
// time either route loads — rolling the optimized-deps hash and 504-ing the
|
||||
// chunks the in-flight page already referenced. Pre-listing them forces a
|
||||
// single consistent pre-bundle at server startup.
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'echarts/core',
|
||||
'echarts/charts',
|
||||
'echarts/components',
|
||||
'echarts/renderers',
|
||||
],
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user