GoogleChromeLabs / worker-plugin

👩‍🏭 Adds native Web Worker bundling support to Webpack.
https://npm.im/worker-plugin
Apache License 2.0
1.91k stars 79 forks source link

fix: replace options parameter with `undefined` to fix trailing commas #66

Closed alan-agius4 closed 4 years ago

alan-agius4 commented 4 years ago

Currently when the options parameter only contains type property the parameter is removed completely which results in a trailing comma. With this change we replace the options parameter with undefined.

Before

const hashcashWorker = new Worker(__webpack__worker__0, );

Now

const hashcashWorker = new Worker(__webpack__worker__0, void 0);

Fixes #65

alan-agius4 commented 4 years ago

@developit, do you think you can cut a release please?

developit commented 4 years ago

@alan-agius4 Will do one today!

alan-agius4 commented 4 years ago

Thanks @developit.

developit commented 4 years ago

Published as 4.0.3.