mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-15 20:08:18 +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'),
|
'@': 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: {
|
server: {
|
||||||
port: 5173,
|
port: 5173,
|
||||||
proxy: {
|
proxy: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user