-
Notifications
You must be signed in to change notification settings - Fork 45
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
Import non-JS code from the import declaration #87
Comments
@Constellation we haven't talk about this yet. I like to think that we can solve all these with the content type, hinting to the server the capabilities of the browser, and let the server to decide what version of the code to send down the wire, but that's just a personal opinion at this point. I will be happy to raise this question, and get the champions to weight in. |
What about on the server, in node? |
@briandipalma the way node handles content evaluation is based upon file type, the spec is currently compatible with Node's way of doing things |
It would be nice if (in a future version) the Loader spec had some opinion on this sort of thing. Ideally Loaders are not interested in only JavaScript but would be used to load everything in browser. This would make it possible to override the way |
@matthewp loader allows you to "fetch" any url (it is not opinionated about that), in fact you have the hooks to do whatever you want to produce the final url. After that, it will just delegate to the underlaying fetching mechanism (http fetch) unless you have a hook for that as well. Then you have the the rest of the hooks to produce something meaningful for the user-land, which could be anything (literally anything). I don't think Loader spec will have any opinion on that regard. If you want to load some CSS content to inject it manually, you should be able to do so with a custom translate/instantiate that exports the CSS blob. If, in the other hand, you want to just insert the I do agree that in the future, browser's default loader might implement some default behavior to facilitate |
I'd like to ask people working on loaders about how to import non-JS code.
My main interest is, how to load WASM code :)
If we already have a consensus, sorry.
import "~~~~~.wasm"
)import "wasm://code"
)The text was updated successfully, but these errors were encountered: