-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Hi!
When using the cloudflare-workers+vite
template, I can augment the preview
with the --live-reload
script to get hot reloading of my changes:
"scripts": {
"dev": "vite",
"preview": "wrangler dev --live-reload",
"deploy": "wrangler deploy"
},
When trying the same on the x-basic
template, changes to my code are not hot-reloaded. I have to manually run the build
script to get the new changes.
When I add a build
section to my wrangler.jsonc
:
"build": {
"watch_dir": "./app",
"command": "bun run build"
},
...the build script always runs twice*, leading to very long reload times.
What is the recommended configuration to get performant hot-reloading?
Thanks!
*I know that the honox build script calls vite
twice (vite build --mode client && vite build
), so configuring the build
section as described above calls vite
4 times on changes.
Metadata
Metadata
Assignees
Labels
No labels