-
-
Notifications
You must be signed in to change notification settings - Fork 37.1k
Worker instantiation from URLs #30780
Copy link
Copy link
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.workerIssues and PRs related to the worker_threads module and Worker API.Issues and PRs related to the worker_threads module and Worker API.
Description
Activity
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.workerIssues and PRs related to the worker_threads module and Worker API.Issues and PRs related to the worker_threads module and Worker API.
When creating workers from within modules, we don't have
__filenameor__dirnameso rather have to rely on import.meta.url, something like:To avoid the
fileURLToPathcall being necessary here, should we consider supporting URLs as input intonew Worker?