From fa779017ad0386fcfe74e4f7f27dc8db38e2dde3 Mon Sep 17 00:00:00 2001 From: Percs <83934299+Percslol@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:39:55 -0500 Subject: [PATCH] fix worker rewriter --- src/shared/rewriters/worker.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/shared/rewriters/worker.ts b/src/shared/rewriters/worker.ts index 5e1d8dc..009925f 100644 --- a/src/shared/rewriters/worker.ts +++ b/src/shared/rewriters/worker.ts @@ -1,9 +1,8 @@ import { rewriteJs } from "./js"; export function rewriteWorkers(js: string, origin?: URL) { - let str = new String().toString()[ - //@ts-expect-error - ("codecs", "config", "shared", "client") - ].forEach((script) => { + let str = new String().toString(); + + ["codecs", "config", "shared", "client"].forEach((script) => { str += `import "${self.$scramjet.config[script]}"\n`; }); str += rewriteJs(js, origin);