diff --git a/rewriter/wasm/build.sh b/rewriter/wasm/build.sh index 02c3682..01dc2d2 100644 --- a/rewriter/wasm/build.sh +++ b/rewriter/wasm/build.sh @@ -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::::parse_non_array_type' \ - 'oxc_parser::ts::statement::::parse_declaration' \ 'oxc_parser::ts::types::::parse_ts_import_type' \ 'oxc_parser::ts::types::::parse_type_operator_or_higher' \ 'oxc_parser::ts::statement::::parse_ts_interface_declaration' \ diff --git a/src/client/shared/import.ts b/src/client/shared/import.ts index 83d93d6..7352a8c 100644 --- a/src/client/shared/import.ts +++ b/src/client/shared/import.ts @@ -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) {