mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 22:40:01 -04:00
refactor: everything
This commit is contained in:
parent
78e666d314
commit
506d99f9b6
37 changed files with 925 additions and 885 deletions
13
src/client/shared/import.ts
Normal file
13
src/client/shared/import.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { encodeUrl } from "../shared";
|
||||
|
||||
export default function (client, self) {
|
||||
self.$sImport = function (base) {
|
||||
return function (url) {
|
||||
const resolved = new URL(url, base).href;
|
||||
|
||||
return function () {}.constructor(
|
||||
`return import("${encodeUrl(resolved)}")`
|
||||
)();
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue