How to use JSX in a web worker with Vite?

Viewed 14

I'm using the @remote-ui/react library to render my React code in a web worker. I'm using Vite for my project, but whenever I try to use JSX in my worker script, I see the following error:

Uncaught Error: @vitejs/plugin-react can't detect preamble. Something is wrong. See https://github.com/vitejs/vite-plugin-react/pull/11#discussion_r430879201

I've created a minimal reproduction here.

0 Answers
Related