Skip to content

Cache vite writeBundle plugins across HMR rebuilds#1357

Merged
jonathanlab merged 1 commit intomainfrom
twixes/cache-vite-writebundle-plugins
Mar 30, 2026
Merged

Cache vite writeBundle plugins across HMR rebuilds#1357
jonathanlab merged 1 commit intomainfrom
twixes/cache-vite-writebundle-plugins

Conversation

@Twixes
Copy link
Copy Markdown
Member

@Twixes Twixes commented Mar 30, 2026

Problem

Every time you save a main process file, the writeBundle hooks re-copy ~120MB of binaries (claude-cli, codex-acp, ripgrep) and re-download skills from two GitHub release URLs. This inflates IOAccelerator memory and makes HMR rebuilds way slower than they need to be.

Changes

Added a simple "already done" flag to each of the three copy plugins so they only run once per dev session. The first build still does everything, subsequent HMR rebuilds skip the copies.

Skip re-copying claude-cli (~42MB), codex-acp binaries (~80MB),
and re-downloading skills from GitHub on every main process rebuild.
Only run these on the first build per dev session.
@jonathanlab jonathanlab merged commit d20f1cb into main Mar 30, 2026
14 checks passed
@jonathanlab jonathanlab deleted the twixes/cache-vite-writebundle-plugins branch March 30, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants