From 1713df13524ad20c6bd0413bcf4aa57adc3f9735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 31 Oct 2023 01:25:58 +0100 Subject: feat: deno run --unstable-hmr (#20876) This commit adds `--unstable-hmr` flag, that enabled Hot Module Replacement. This flag works like `--watch` and accepts the same arguments. If HMR is not possible the process will be restarted instead. Currently HMR is only supported in `deno run` subcommand. Upon HMR a `CustomEvent("hmr")` will be dispatched that contains information which file was changed in its `details` property. --------- Co-authored-by: Valentin Anger Co-authored-by: David Sherret --- cli/standalone/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cli/standalone') diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index 612ae9eed..803655b9a 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -446,6 +446,8 @@ pub async fn run( fs, None, None, + None, + None, feature_checker, CliMainWorkerOptions { argv: metadata.argv, @@ -453,6 +455,7 @@ pub async fn run( coverage_dir: None, enable_testing_features: false, has_node_modules_dir, + hmr: false, inspect_brk: false, inspect_wait: false, is_inspecting: false, -- cgit v1.2.3