mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
11 lines
No EOL
357 B
TypeScript
11 lines
No EOL
357 B
TypeScript
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) => {
|
|
str += `import "${self.$scramjet.config[script]}"\n`
|
|
})
|
|
str += rewriteJs(js, origin);
|
|
|
|
return str;
|
|
} |