From b92019a8475a16213028ab73b15be5a3f7c56e0a Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 1 Nov 2021 14:46:07 -0400 Subject: port check_if_should_use_esm_loader to rust (#12562) --- cli/main.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'cli/main.rs') diff --git a/cli/main.rs b/cli/main.rs index 67b59a443..d1ee4a012 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -1153,11 +1153,7 @@ async fn run_command( // this file. worker.execute_side_module(&compat::MODULE_URL).await?; - let use_esm_loader = compat::check_if_should_use_esm_loader( - &mut worker.js_runtime, - &main_module.to_file_path().unwrap().display().to_string(), - ) - .await?; + let use_esm_loader = compat::check_if_should_use_esm_loader(&main_module)?; if use_esm_loader { // ES module execution in Node compatiblity mode -- cgit v1.2.3