fix(ext/node): worker_threads load as commonjs if pkg.type is not module

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
This commit is contained in:
Satya Rohith 2024-03-18 13:17:10 +05:30
parent 9c5ddf7c69
commit ef6e0cc058
No known key found for this signature in database
GPG Key ID: B2705CF40523EB05

View File

@ -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 =