diff options
author | Luca Casonato <hello@lcas.dev> | 2023-05-09 12:37:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 12:37:13 +0200 |
commit | f34fcd16ea4d504c8a87c0873c65598d70bb1d07 (patch) | |
tree | db7eb7b1dd7f082fc28eb16f8cb3760296bed8e5 /cli/build.rs | |
parent | 723d4b038203e35f5be6d11088a7288e6d709869 (diff) |
fix(core): let V8 drive extension ESM loads (#18997)
This now allows circular imports across extensions.
Instead of load + eval of all ESM files in declaration order, all files
are only loaded. Eval is done recursively by V8, only evaluating
files that are listed in `Extension::esm_entry_point` fields.
---------
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/build.rs b/cli/build.rs index 8e6b670e2..94b49dfe0 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -309,9 +309,11 @@ mod ts { // deps = [runtime] deno_core::extension!( cli, + esm_entry_point = "ext:cli/99_main.js", esm = [ dir "js", - "40_testing.js" + "40_testing.js", + "99_main.js" ], customizer = |ext: &mut deno_core::ExtensionBuilder| { ext.esm(vec![ExtensionFileSource { |