diff --git a/crates/agent-gui/vite.config.ts b/crates/agent-gui/vite.config.ts index a5e11af6c..7d011244e 100644 --- a/crates/agent-gui/vite.config.ts +++ b/crates/agent-gui/vite.config.ts @@ -30,22 +30,20 @@ export default defineConfig(async () => ({ }, build: { // Monaco language workers are emitted as indivisible lazy assets (largest - // is the TypeScript worker at ~6.6 MB). Application modules are still held - // to the 450 KB code-splitting group below. + // is the TypeScript worker at ~6.6 MB). Bump the warning limit so those + // known-large chunks don't drown out real regressions in the console. chunkSizeWarningLimit: 7_000, + // NOTE: a previous build config set `rolldownOptions.output.codeSplitting` + // with a `liveagent-app` group. That custom chunking split the + // `style-to-js → style-to-object → inline-style-parser` CommonJS interop + // chain across chunks, and rolldown's `__commonJSMin` thunks failed to + // initialize across the chunk boundary — the release bundle crashed at + // render time with "require_cjs$N is not a function" (black screen), while + // `tauri dev` (no chunk splitting) worked. Disabled here to fall back to + // rolldown's default automatic chunking, which keeps that CJS chain intact. rolldownOptions: { output: { - codeSplitting: { - minSize: 20_000, - maxSize: 450_000, - groups: [ - { - name: "liveagent-app", - test: /\/crates\/(?:agent-gui|agent-ui)\/src\//, - entriesAware: true, - }, - ], - }, + codeSplitting: false, }, }, },