diff options
author | Alon Zakai <azakai@google.com> | 2019-07-28 10:57:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-28 10:57:23 -0700 |
commit | 6ac5fa713b421588eede2e791235e4b60b22b172 (patch) | |
tree | cab48897fe2a54325b6144469ecce0a3e2e6eb4a /scripts/test/node-esm-loader.mjs | |
parent | 772891f6270c20c34f3dc1d3984cffc6fa824d02 (diff) | |
download | binaryen-6ac5fa713b421588eede2e791235e4b60b22b172.tar.gz binaryen-6ac5fa713b421588eede2e791235e4b60b22b172.tar.bz2 binaryen-6ac5fa713b421588eede2e791235e4b60b22b172.zip |
wasm2js: Mangle import names for JS (#2267)
This fixes names that would be invalid in JS, like a.b. Turns out the Go compiler emits wasm with such imports.
Also add some docs on how to use wasm2js.
Fixes #2263
Diffstat (limited to 'scripts/test/node-esm-loader.mjs')
-rw-r--r-- | scripts/test/node-esm-loader.mjs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/test/node-esm-loader.mjs b/scripts/test/node-esm-loader.mjs index 8cd722822..5d41033fb 100644 --- a/scripts/test/node-esm-loader.mjs +++ b/scripts/test/node-esm-loader.mjs @@ -16,9 +16,8 @@ export function resolve(specifier, parentModuleURL = baseURL, defaultResolve) { format: 'builtin' }; } - // Resolve the 'spectest' and 'env' modules to our custom implementations of - // various builtins. - if (specifier == 'spectest' || specifier == 'env') { + // Resolve special modules used in our test suite. + if (specifier == 'spectest' || specifier == 'env' || specifier == 'mod.ule') { const resolved = new URL('./scripts/test/' + specifier + '.js', parentModuleURL); return { url: resolved.href, |