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 for commonjs exports.xxx? #20

Open
wclr opened this issue Feb 3, 2018 · 1 comment
Open

Support for commonjs exports.xxx? #20

wclr opened this issue Feb 3, 2018 · 1 comment

Comments

@wclr
Copy link

wclr commented Feb 3, 2018

Seems commonjs modules are not supported?

module.exports.xxx = function () {
   return 1
}

or

exports.xxx = () => {
   ...
}

Is there a reason for this?

@developit
Copy link
Owner

Yes - workerize only recognizes ES Modules. I'm open to changing that, making the export detection work at runtime instead. It will require making module instantiation asynchronous though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants