We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f588f0e commit f3b54f0Copy full SHA for f3b54f0
1 file changed
examples/scripts/importing_bytes.ts
@@ -17,13 +17,13 @@
17
// Binary files can be imported in JS and TS modules. When doing so, you need to
18
// specify the `type: "bytes"` import attribute.
19
import bytes from "./image.png" with { type: "bytes" };
20
-console.log(text);
+console.log(bytes);
21
22
// Dynamic imports are also supported.
23
const text = await import("./image.png", {
24
with: { type: "bytes" },
25
});
26
-console.log(bytes);
+console.log(text);
27
28
/* File: ./image.png
29
89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52
0 commit comments