-
Notifications
You must be signed in to change notification settings - Fork 195
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
Proposal. support https import static and dynamic #255
Comments
Hi, thanks for your suggestion. That seems to be a reasonable extension, we might have to add it behind a flag in order to stay compatible. Sounds like something a student or intern could do, or where we could use an external contribution. Is there any "specification" for this available? You write this is not available on Node.js, not even as an experimental feature or in a branch? Thanks, |
@wirthi thanks for your reply i will write all infos into this issue and ping you back maybe even with a pull request as i am aware of the specs and how it works i only wanted to make sure that you would accept that. |
I think #257 is related to this, @eleinadani should be able to confirm. I think technically it would be possible to use a custom Truffle file system that supports the http/https scheme to load files. However this would be a pain as AFAIK it requires you to register a custom Using Unfortunately it doesn't seem to support using the URL connection unless the default Truffle file system is being used. |
@jazdw good point and ya sure its a bit complex for example in deno we solved that via using a bundler on startup that populates a cache folder so the important algo is |
Is this issue say deno support work on progress? |
Today with current ECMAScript 2022 i have switched to TLA Top Level Await and using fetch to request the resources then taking the text body messaging that to the engine and let it do its work so implemented that in userland without hooks. when i do not want or need to use the engine as it is a small script then i even go for Pseudo code needed to write fast fetch().then(res=>import(`data:text/javascript;base64,${base64(res.text())}`)) |
closed by: as graaljs runs already in the browser with above posted modifications it also will use the browser cache this can be closed. @burakakca yes the linked issue in this comment tracks also graaljs deno support out of the box in fact i invented a web platform compatible shared module and package format in on this changes everything fundamental so deno and graaljs support the new web-modules standard today out of the box only ecosystem adoption is needed and happens just now via integration into vscode which will then run directly without a backend in the browser again supporting web-modules graaljs is only a device in that stack every external source is a device |
In NodeJS This feature is not possible without custom loaders and will not get implemented as they don't want to handle cache and that. They say it belongs to the user land.
Anyway it is a feature that for example is supported by deno a JS/TS Runtime written in rust by the creator of nodejs ryan dahl.
i think it would be really great if we could simply on compile fetch the resources and then also support browser resolve so relativ resolve by url
The text was updated successfully, but these errors were encountered: