Skip to content
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 arbitrary files as raw bytes #155

Closed
AljoschaMeyer opened this issue Mar 24, 2024 · 1 comment
Closed

Importing arbitrary files as raw bytes #155

AljoschaMeyer opened this issue Mar 24, 2024 · 1 comment

Comments

@AljoschaMeyer
Copy link

I found myself here looking for a way to import arbitrary data files in Deno and have distribution via package managers just work. Hypothetical example:

import rawBytes from "./stuff.someCustomExtensionNobodyElseCaresAbout" with { type: "UInt8Array" };

export const usefulStuff = parseMyCustomFormat(rawBytes);

As someone who is not really a web developer, seeing support for a select few blessed data formats but excluding the most simple and general choice (arbitrary sequences of bytes) feels odd to me.

Is there support for this (in this proposal, not in Deno) and I just didn't find it? Is there any chance a feature like this could be supported eventually? Or am I missing some web-specific context that would make this impossible?


This is not a duplicate of #116 as far as I understand it. #116 wants to obtain information on how to interpret the module contents from a server, I want to not interpret the module contents.

@AljoschaMeyer
Copy link
Author

AljoschaMeyer commented Mar 24, 2024

Should have looked in the closed issues first, this is (essentially) a duplicate of #120. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant