surma / rollup-plugin-off-main-thread

Use Rollup with workers and ES6 modules today.
Apache License 2.0
308 stars 32 forks source link

data url option #21

Open girving opened 4 years ago

girving commented 4 years ago

Would it be possible to add an option to bundle the worker into the main module using a data url, to avoid a separate network request? I've tried to make this using a combination of omt and other plugins, and have failed to figure it out. Would be nice if omt did this out of the box.

darionco commented 4 years ago

https://github.com/darionco/rollup-plugin-web-worker-loader

:D

girving commented 4 years ago

@darionco I also tried yours. I forget why it didn't work.

surma commented 3 years ago

I don’t quite follow. There is an official Data URL plugin. Does that not work for you?