Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ES modules in workers #21502

Closed
targos opened this issue Jun 24, 2018 · 2 comments
Closed

Support ES modules in workers #21502

targos opened this issue Jun 24, 2018 · 2 comments
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. feature request Issues that request new features to be added to Node.js. worker Issues and PRs related to Worker support.

Comments

@targos
Copy link
Member

targos commented Jun 24, 2018

This is how it should be done according to the HTML spec:

const worker = new Worker('worker.mjs', { type: 'module' });
@targos targos added feature request Issues that request new features to be added to Node.js. esm Issues and PRs related to the ECMAScript Modules implementation. worker Issues and PRs related to Worker support. labels Jun 24, 2018
@targos
Copy link
Member Author

targos commented Jun 24, 2018

I just realized this is already supported and tested.

@targos targos closed this as completed Jun 24, 2018
@guybedford
Copy link
Contributor

It sounds like type: 'module' may be useful to add at a later stage as an analog to node --mode module x.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. feature request Issues that request new features to be added to Node.js. worker Issues and PRs related to Worker support.
Projects
None yet
Development

No branches or pull requests

2 participants