rename encodeUrl to rewriteUrl

This commit is contained in:
velzie 2024-10-12 15:00:03 -04:00
parent 839b490c80
commit 3062db5df9
26 changed files with 78 additions and 75 deletions

View file

@ -1,6 +1,6 @@
import { ScramjetClient } from "../client";
import { config } from "../../shared";
import { encodeUrl } from "../../shared/rewriters/url";
import { rewriteUrl } from "../../shared/rewriters/url";
export default function (client: ScramjetClient, self: Self) {
const Function = client.natives.Function;
@ -9,7 +9,9 @@ export default function (client: ScramjetClient, self: Self) {
return function (url: string) {
const resolved = new URL(url, base).href;
return Function(`return import("${encodeUrl(resolved, client.meta)}")`)();
return Function(
`return import("${rewriteUrl(resolved, client.meta)}")`
)();
};
};