The Hot File#
During npm run dev or bun run dev, TemplateX writes public/hot with the local Vite dev server URL.
WordPress uses that file to request development assets and load Vite's refresh client.
The file is removed when the dev server stops.
Reliable Reloads#
Vite ignores TemplateX's generated compiled files while the development watcher is running.
TemplateX invalidates Vite's module cache after a source save finishes compiling, then sends one browser reload. That keeps generated modules and compiled PHP from refreshing the browser before the full TemplateX compile is ready.
No Cached Preview#
While the hot file exists, TemplateX disables WordPress page prefetching and sends no-store headers.
That keeps saved PHP changes from being hidden by a prefetched page.