From ef6e0cc0581b6d6b999e228a9d46b9c6ed1ec8c8 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Mon, 18 Mar 2024 13:17:10 +0530 Subject: [PATCH] fix(ext/node): worker_threads load as commonjs if pkg.type is not module Co-authored-by: Divy Srivastava --- ext/node/polyfills/worker_threads.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/node/polyfills/worker_threads.ts b/ext/node/polyfills/worker_threads.ts index 49f2f3e3e8..8ca08fe7ba 100644 --- a/ext/node/polyfills/worker_threads.ts +++ b/ext/node/polyfills/worker_threads.ts @@ -177,7 +177,7 @@ class NodeWorker extends EventEmitter { StringPrototypeToString(specifier), ".mjs", )) || - (pkg && pkg.exists && pkg.typ == "module") + (pkg && pkg.exists && pkg.typ !== "module") ) { const cwdFileUrl = toFileUrl(Deno.cwd()); specifier =