You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// loader.jsconstresponse=awaitfetch('./test.js');letpayload=awaitresponse.text();// modify payload as necessaryconstblob=newBlob([payload],{type: 'application/javascript'});consturl=URL.createObjectURL(blob);// blob:uuidconstmodule=awaitimport(blob);URL.revokeObjectURL(url);globalThis.loaded=module;
I would like to patch a script (e.g. add exports that expose unexported local variables) before actually importing it. Currently it requires the server to handle the patching. Alternatively the loader can replace leading ., .., / in static imports - this wouldn't work for dynamic imports though.
Instead, the line const module = await import(blob); could be replaced with:
I would like to patch a script (e.g. add exports that expose unexported local variables) before actually importing it. Currently it requires the server to handle the patching. Alternatively the loader can replace leading
.
,..
,/
in static imports - this wouldn't work for dynamic imports though.Instead, the line
const module = await import(blob);
could be replaced with:I'm not sure if this is the correct repo to report this issue - in that case please instruct me where I should report it instead.
Edit: I just found WICG/import-maps#92 so this issue potentially is a duplicate.
The text was updated successfully, but these errors were encountered: