-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.workerIssues and PRs related to Worker support.Issues and PRs related to Worker support.
Description
Unless I missed it, there doesn't seem to be a way of creating a Worker from an ESM source string (with eval: true
).
Example that should be possible somehow:
import { Worker } from 'worker_threads';
new Worker(
`
import { join } from 'path';
console.log(join('hello', 'world'));
`,
{ eval: true },
);
Related: #21502
jkrems, TimDaub, marvinhagemeister, dmail, Tyler-Murphy and 11 more
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.workerIssues and PRs related to Worker support.Issues and PRs related to Worker support.