diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-12-28 20:37:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-28 20:37:10 +0100 |
commit | 576b20aa005c233b95afe6e3692a899ae8f755f2 (patch) | |
tree | 584a0eb42fb785eccfab6a590c1b4b84b77ef51d /runtime/web_worker.rs | |
parent | f85d65e066302ad7357321ec9e2940c2346d2263 (diff) |
fix: allow npm: specifiers in import.meta.resolve (#21716)
Closes https://github.com/denoland/deno/issues/21298.
"npm:" specifiers are matched against import map entries
and if no match is found they are passed through.
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r-- | runtime/web_worker.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 41e6ca4fe..308c294ef 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -5,6 +5,7 @@ use crate::ops; use crate::permissions::PermissionsContainer; use crate::shared::runtime; use crate::tokio_util::create_and_run_current_thread; +use crate::worker::import_meta_resolve_callback; use crate::worker::FormatJsErrorFn; use crate::BootstrapOptions; use deno_broadcast_channel::InMemoryBroadcastChannel; @@ -536,6 +537,9 @@ impl WebWorker { inspector: options.maybe_inspector_server.is_some(), feature_checker: Some(options.feature_checker.clone()), op_metrics_factory_fn, + import_meta_resolve_callback: Some(Box::new( + import_meta_resolve_callback, + )), ..Default::default() }); |