Skip to content

Commit 47f8c02

Browse files
Honeyclaude
andcommitted
fix(dev): rebuild Vite's dependency cache on every dev start
A cached dependency set is reused whenever the lockfile and config are unchanged, even if the code now imports something new (a rebase, a branch switch, an agent adding an icon). Vite then discovers the import mid-load, re-bundles, renames shared chunks and reloads; WebKit is left requesting deleted chunks and the app never renders. `vite --force` rescans at start, costing well under a second. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Honey <44b804aa12cc643328829fa31c020063ef3636c3a73c38ca49641c7626c11bb1@buzz.block.builderlab.xyz>
1 parent 1fa10db commit 47f8c02

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ See [contributing](docs/contributing.md) for exact pins, registry settings,
3636
and the pinned pnpm package's Intel Mac limitation.
3737

3838
Both commands forward arguments to their development tool (Vite or Tauri).
39+
Both rebuild Vite's dependency cache on every start (`vite --force`, under a
40+
second), so imports added since the last run never trigger a mid-load reload.
3941
The default port is derived from the worktree's path, giving each checkout a
4042
stable default that normally avoids collisions between parallel worktrees;
4143
`just desktop` prints the URL it chose. Override it with `just web --port 1431`

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"node": ">=24"
99
},
1010
"scripts": {
11-
"dev": "vite",
12-
"dev:desktop": "vite --strictPort",
11+
"dev": "vite --force",
12+
"dev:desktop": "vite --strictPort --force",
1313
"build": "pnpm typecheck && vite build",
1414
"preview": "vite preview",
1515
"author:build": "node scripts/build-author.mjs",

0 commit comments

Comments
 (0)