Open codehz opened 10 months ago
1.0.11+f7f6233ea
Darwin 23.1.0 arm64 arm
import { readFile } from "./fsw" assert { type: "macro" }; const file = await readFile("package.json"); console.log(file);
due to https://github.com/oven-sh/bun/issues/7111 I have to create a wrapper the fsw is
export * from "node:fs/promises";
got the Uint8Array, because the documentation say it can serialize TypedArray
error: cannot coerce Uint8Array to Bun's AST. Please return a valid macro using the JSX syntax const file = await readFile("package.json"); ^ ###/bun-bug/read.ts:3:20 79
No response
Still experiencing this as of v1.1.12. Is the documentation wrong?
Workaround for now is to explicitly base64 encode before returning
What version of Bun is running?
1.0.11+f7f6233ea
What platform is your computer?
Darwin 23.1.0 arm64 arm
What steps can reproduce the bug?
due to https://github.com/oven-sh/bun/issues/7111 I have to create a wrapper the fsw is
What is the expected behavior?
got the Uint8Array, because the documentation say it can serialize TypedArray
What do you see instead?
Additional information
No response