mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
port check_if_should_use_esm_loader to rust (#12562)
This commit is contained in:
parent
1b684d333d
commit
b92019a847
7 changed files with 42 additions and 32 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue