mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
Disable threading for now, add locationProxy.host as an *empty string*, it will get overriden later, but TS doesn't know that.
This commit is contained in:
parent
d433f67d67
commit
f42274d5ce
2 changed files with 6 additions and 2 deletions
|
@ -11,7 +11,9 @@ function createLocation() {
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const locationProxy = new Proxy({}, {
|
export const locationProxy = new Proxy({
|
||||||
|
host: ""
|
||||||
|
}, {
|
||||||
get(target, prop) {
|
get(target, prop) {
|
||||||
const loc = createLocation();
|
const loc = createLocation();
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,9 @@ export async function swfetch(this: ScramjetServiceWorker, { request }: FetchEve
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "script":
|
case "script":
|
||||||
responseBody = await this.threadpool.rewriteJs(await response.arrayBuffer(), url.toString());
|
responseBody = rewriteJs(await response.arrayBuffer(), url);
|
||||||
|
// Disable threading for now, it's causing issues.
|
||||||
|
// responseBody = await this.threadpool.rewriteJs(responseBody, url.toString());
|
||||||
break;
|
break;
|
||||||
case "style":
|
case "style":
|
||||||
responseBody = rewriteCss(await response.text(), url);
|
responseBody = rewriteCss(await response.text(), url);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue