mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-12 22:10:01 -04:00
fix: fix importfn and remove ts snip
This commit is contained in:
parent
f71e9c1ee0
commit
6b43c90831
2 changed files with 3 additions and 8 deletions
|
@ -40,7 +40,6 @@ cd ../../
|
|||
wasm-snip rewriter/wasm/out/wasm_bg.wasm -o rewriter/wasm/out/wasm_snipped.wasm \
|
||||
-p 'oxc_regular_expression::.*' \
|
||||
'oxc_parser::ts::types::<impl oxc_parser::ParserImpl>::parse_non_array_type' \
|
||||
'oxc_parser::ts::statement::<impl oxc_parser::ParserImpl>::parse_declaration' \
|
||||
'oxc_parser::ts::types::<impl oxc_parser::ParserImpl>::parse_ts_import_type' \
|
||||
'oxc_parser::ts::types::<impl oxc_parser::ParserImpl>::parse_type_operator_or_higher' \
|
||||
'oxc_parser::ts::statement::<impl oxc_parser::ParserImpl>::parse_ts_interface_declaration' \
|
||||
|
|
|
@ -5,14 +5,10 @@ import { rewriteUrl } from "../../shared/rewriters/url";
|
|||
export default function (client: ScramjetClient, self: Self) {
|
||||
const Function = client.natives.store["Function"];
|
||||
|
||||
self[config.globals.importfn] = function (base: string) {
|
||||
return function (url: string) {
|
||||
const resolved = new URL(url, base).href;
|
||||
self[config.globals.importfn] = function (base: string, url: string) {
|
||||
const resolved = new URL(url, base).href;
|
||||
|
||||
return Function(
|
||||
`return import("${rewriteUrl(resolved, client.meta)}")`
|
||||
)();
|
||||
};
|
||||
return Function(`return import("${rewriteUrl(resolved, client.meta)}")`)();
|
||||
};
|
||||
|
||||
self[config.globals.metafn] = function (base: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue