-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.staleworkerIssues and PRs related to Worker support.Issues and PRs related to Worker support.
Description
Node.js users has two problems:
- Simple and powerful sandboxing.
- Using ES modules.
Workers can solve both of them in very elegant way with custom resolvers which are the same as experimental es module resolver.
const worker = new Worker('./worker-path.js', {
moduleLoader: {resolve, dynamicInstantiate},
});It solves sandboxing with full dependency control in custom context. And it simplifies es modules usage with preserving usual code flow in main thread and es flow in worker thread.
/cc @addaleax @TimothyGu @Qard @aqrln @oe @benjamingr @nodejs/workers
benjamingr and lin7sh
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.staleworkerIssues and PRs related to Worker support.Issues and PRs related to Worker support.