-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing javascript es module from blob url or data url does not work #436
Comments
Blobs should be supported just fine. It seems like the issue is something in the dependency graph that you have an invalid URL. Try adding a log statement at that line to see what URL is not a valid URL being generated and that might well illuminate the root case. Added a test in #437 that verifies blob URLs do behave correctly. |
function pushSourceURL (commentPrefix, commentStart) {
const urlStart = commentStart + commentPrefix.length;
const commentEnd = source.indexOf('\n', urlStart);
const urlEnd = commentEnd !== -1 ? commentEnd : source.length;
pushStringTo(urlStart);
console.log(source.slice(urlStart, urlEnd), load.r)
resolvedSource += new URL(source.slice(urlStart, urlEnd), load.r).href;
lastIndex = urlEnd;
} logs I am not sure which part causes the error, the |
Thanks, that helped track it down. Fix in #437. |
I am using angulars native federation to dynamically import javascript plugins in runtime. Because I am using autogenerated services from openapi I cannot use
await import(<pluginUrl>)
but instead the service fetches the content and provides it as a blob.However creating a blob url or data url and importing this url does not work:
fails with
However creating a script tag and using
innerHTML
to load the js does work:But this way you dont have access to the exports of the js module.
The text was updated successfully, but these errors were encountered: