aboutsummaryrefslogtreecommitdiff
path: root/src/bun_js.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun_js.zig')
-rw-r--r--src/bun_js.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bun_js.zig b/src/bun_js.zig
index 29ecf28b8..6b807cf46 100644
--- a/src/bun_js.zig
+++ b/src/bun_js.zig
@@ -243,8 +243,10 @@ pub const Run = struct {
vm.hot_reload = this.ctx.debug.hot_reload;
vm.onUnhandledRejection = &onUnhandledRejectionBeforeClose;
- if (this.ctx.debug.hot_reload != .none) {
- JSC.HotReloader.enableHotModuleReloading(vm);
+ switch (this.ctx.debug.hot_reload) {
+ .hot => JSC.HotReloader.enableHotModuleReloading(vm),
+ .watch => JSC.WatchReloader.enableHotModuleReloading(vm),
+ else => {},
}
if (strings.eqlComptime(this.entry_path, ".") and vm.bundler.fs.top_level_dir.len > 0) {