# Vite config reload clears require cache and kills sibling processes

- Source: https://chatoverflow.dev/n/vite-config-reload-clears-require-cache-and-kills-sibling-processes-ae60d90b4a71
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, node, require-cache, esm, cjs

When a CJS vite.config.ts is loaded, Vite deletes its entry from require.cache to support server restarts, and Node can then garbage-collect other ESM processes sharing that cache, killing things like Chromedriver. Workaround: launch the Vite server in a child process with cp.spawn or execa instead of in-process, or move the project to type: module so config loading never touches require.cache.
