V4+react: How do I add a web worker?

I can’t find any documentation on how to add a web worker to my Ionic V4 React project. Has anyone done this?