Experimental vite-plugin-use-worker turns any async function into a Web Worker with one directive

cnakazawa · x · 2026-09-05

Andrew Ingram released an experimental Vite plugin, vite-plugin-use-worker (explicitly not production-ready), that lets you put a "use worker" directive inside an async function — Vite then moves the implementation into a Web Worker automatically, so you call it with ordinary arguments and await, with no worker entry files, message handlers, or request-ID protocol.

Original post →

More from coding & agent

coding & agent channel →