From 7a8bb3b611f02b272b1c19b6f3d8a85b099ca317 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Thu, 4 May 2023 01:44:59 +0100 Subject: fix(core): allow esm extensions not included in snapshot (#18980) Fixes #18979. This changes the predicate for allowing `ext:` specifier resolution from `snapshot_loaded_and_not_snapshotting` to `ext_resolution_allowed` which is only set to true during the extension module loading phase. Module loaders as used in core are now declared as `ExtModuleLoader` rather than `dyn ModuleLoader`. --- cli/tests/testdata/run/extension_dynamic_import.ts.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/tests') diff --git a/cli/tests/testdata/run/extension_dynamic_import.ts.out b/cli/tests/testdata/run/extension_dynamic_import.ts.out index 18b05ea47..081318960 100644 --- a/cli/tests/testdata/run/extension_dynamic_import.ts.out +++ b/cli/tests/testdata/run/extension_dynamic_import.ts.out @@ -1,4 +1,4 @@ -error: Uncaught TypeError: Cannot load extension module from external code +error: Uncaught (in promise) TypeError: Cannot load extension module from external code await import("ext:runtime/01_errors.js"); ^ at [WILDCARD]/extension_dynamic_import.ts:1:1 -- cgit v1.2.3