fix: Chart Circular Dependency (#772)

* Fix: Chart Circular Dependency

* Corrections to greptile reviews

* code rabbit coding guideline

---------
This commit is contained in:
Victor Jack
2026-07-24 14:09:09 +01:00
committed by GitHub
parent 2ceafcc6d1
commit 05833f441f
15 changed files with 156 additions and 80 deletions
+7 -1
View File
@@ -47,7 +47,13 @@ export default ({ mode }) => {
},
optimizeDeps: {
entries: ['src/routes/**/+*.{js,ts,svelte}'],
include: ['@cio/api/rpc-types'],
include: [
'@cio/api/rpc-types',
// Pre-bundle layerchart via esbuild so its internal circular dependencies
// are flattened before Vite SSR evaluates them. Without this, Vite's SSR
// transform hits a "not yet fully initialized" circular-dep error.
'layerchart'
],
// Workspace packages must be processed by Svelte/Vite (not pre-bundled)
// so HMR fires when editing files under packages/*.
exclude: ['@cio/ui', '@cio/utils', '@cio/question-types']