Skip to content
Snippets Groups Projects
Commit dcef6108 authored by amesgen's avatar amesgen Committed by Cheng Shao
Browse files

wasm: prevent bundlers from resolving import("node:timers")

(cherry picked from commit 7202a02c0a5238682de6a3a06a9b5137f02ad70c)
(cherry picked from commit 5e60fd64)
parent 30d4f0ce
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,9 @@ const setImmediate = await (async () => {
// deno
if (globalThis.Deno) {
return (await import("node:timers")).setImmediate;
try {
return (await import("node:timers")).setImmediate;
} catch {}
}
// https://developer.mozilla.org/en-US/docs/Web/API/Scheduler/postTask
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment