-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add text and binary module types #1025
base: main
Are you sure you want to change the base?
Conversation
I don't think these changes are necessary, if we decide to do it in Deno, the |
The trouble I ran into here is that dynamic imports are handled directly by |
IMHO, this feature should not be included because it is still a proposal in the discussion stage in the web standards. At least, we need to make sure that there is no opposition in the standard position of the three browsers. |
Or, it requires the unstable flag. |
Pursuant to denoland/deno#20374 and denoland/deno#25354.
RequestedModuleType::as_str
convenience method.RequestedModuleType
parameter toprepare_load
to mirrorload
.prepare_load
. Otherwise any file that looks-like JS or JSON based on file extension orContent-Type
header can't be imported as text or binary.ModuleType::Text
andBinary
.deno_core
? It seems broadly useful, but maybe you want to keep core closer to the ECMAScript standard and implement these in thedeno
CLI embedding. I think this would be the first module type not to go in core if so."binary"
the right name, or do you want"bytes"
?ArrayBuffer
is mutable? If not, can we hackily make the import return something immutable, or must we block on standardization and v8 implementation?Fully implementing this feature will also involve changes to deno_graph and deno, and a one-line change to deno_doc.