workerize-loader icon indicating copy to clipboard operation
workerize-loader copied to clipboard

Support for commonjs exports.xxx?

Open wclr opened this issue 7 years ago • 1 comments

Seems commonjs modules are not supported?

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

or

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

Is there a reason for this?

wclr avatar Feb 03 '18 10:02 wclr

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.

developit avatar Feb 26 '18 15:02 developit