-
-
Notifications
You must be signed in to change notification settings - Fork 784
[Feature]: Support with { type: 'bytes' } imports #11881
Copy link
Copy link
Labels
teamThe issue/pr is created by the member of Rspack.The issue/pr is created by the member of Rspack.
Description
What problem does this feature solve?
Support the new Import Bytes proposal — allowing developers to import raw binary files directly as Uint8Array.
References
- webpack v5.102.0 – implemented
- esbuild@v0.25.11 – implemented
- Already available in Deno and Bun, see https://x.com/robpalmer2/status/1978377233891725357
What does the proposed API of configuration look like?
Example:
import buf from "./a.png" with { type: "bytes" };
console.log(buf instanceof Uint8Array); // trueReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
teamThe issue/pr is created by the member of Rspack.The issue/pr is created by the member of Rspack.