Fast Refresh and Native Hot Reload
Web Fast Refresh
The Hosanna Web app is powered by Vite. When you run
npx hst run web dev browser, HST starts or reuses Vite, generator watch, and
debugger services. Generated struct files must remain current.
Device Fast Refresh
Native Apple and Android targets support an explicit JavaScript dev-server mode:
npx hst run ios dev sim --hot-reload
npx hst run apple-tv dev sim --hot-reload
npx hst run android dev sim --hot-reload
npx hst run android-tv dev sim --hot-reload
Without --hot-reload, native runs use the bundled JavaScript/assets path.
This is the release-like mode and the default.
For a physical iPhone, set HS_DEV_JS_URL to a Mac LAN URL the phone can
reach. Android normally detects a usable LAN host; set HS_DEV_HOST only when
that detection selects an unreachable address.
Roku does not load the TypeScript bundle from the native hot-reload server.
After a successful compiler build, --no-build can redeploy already-generated
output:
npx hst run roku dev device \
--no-build \
--source-root platforms/roku/src \
--device "Living Room Roku"
This does not include later TypeScript changes; rebuild when source changed. Samsung device refresh behavior belongs to the application's Samsung packaging and device workflow and should not be inferred from browser HMR.
Tips for Rapid Debugging on Device
- Use browser HMR for most shared view/config changes.
- On Roku, use
npx hst run roku dev device --no-build --source-root platforms/roku/srcafter a successful build when you only need to redeploy the generated package. - On Apple and Android native targets, use
--hot-reloadonly for the development loop and rerun bundled mode before release. - Treat edits to generated
.brsas disposable diagnostics. Apply the real fix in TypeScript and rebuild. - Validate native services, packaging, lifecycle, input, and rendering on the actual target even when the browser result is correct.