mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
fix(deno_os): allow running WebWorker without snapshots (#28975)
This addresses [#28680](https://github.com/denoland/deno/issues/28680) where the esm modules are not found when instantiating a WebWorker with snapshots disabled. This is an alternative solution to another PR, https://github.com/denoland/deno/pull/28693
This commit is contained in:
parent
2eeccf1045
commit
e612d572f8
1 changed files with 7 additions and 1 deletions
|
@ -113,7 +113,13 @@ deno_core::extension!(
|
|||
ops::signal::op_signal_unbind,
|
||||
ops::signal::op_signal_poll,
|
||||
],
|
||||
esm = ["30_os.js", "40_signals.js"],
|
||||
// deno_os and deno_os_worker may be used interchangeably, ensure that all
|
||||
// esm modules are given the same identifiers. This is important when
|
||||
// using `WebWorker` without snapshotting.
|
||||
esm = [
|
||||
"ext:deno_os/30_os.js" = "30_os.js",
|
||||
"ext:deno_os/40_signals.js" = "40_signals.js",
|
||||
],
|
||||
middleware = |op| match op.name {
|
||||
"op_exit" | "op_set_exit_code" | "op_get_exit_code" =>
|
||||
op.with_implementation_from(&deno_core::op_void_sync()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue