workerize-loader
workerize-loader copied to clipboard
Support for commonjs exports.xxx?
Seems commonjs modules are not supported?
module.exports.xxx = function () {
return 1
}
or
exports.xxx = () => {
...
}
Is there a reason for this?
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.