mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
support url base
This commit is contained in:
parent
a1ce4e33b3
commit
7a9c990b01
32 changed files with 213 additions and 158 deletions
|
@ -1,5 +1,6 @@
|
|||
import { ScramjetClient } from "../client";
|
||||
import { config, encodeUrl } from "../../shared";
|
||||
import { config } from "../../shared";
|
||||
import { encodeUrl } from "../../shared/rewriters/url";
|
||||
|
||||
export default function (client: ScramjetClient, self: Self) {
|
||||
const Function = client.natives.Function;
|
||||
|
@ -8,7 +9,7 @@ export default function (client: ScramjetClient, self: Self) {
|
|||
return function (url: string) {
|
||||
const resolved = new URL(url, base).href;
|
||||
|
||||
return Function(`return import("${encodeUrl(resolved)}")`)();
|
||||
return Function(`return import("${encodeUrl(resolved, client.meta)}")`)();
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue