start intercepting workers

This commit is contained in:
Percs 2024-07-12 20:10:09 -05:00
parent 9c4f157dd8
commit 25f3fd7316
3 changed files with 8 additions and 1 deletions

7
src/client/worker.ts Normal file
View file

@ -0,0 +1,7 @@
import { encodeUrl } from "../bundle";
const RealWorker = Worker
Worker = new Proxy(Worker, {
construct(_target, args) {
return new RealWorker(encodeUrl(args[0]), args[1])
}
})