Refactoring some more file IO to bun - #79
Conversation
gornostay25
left a comment
There was a problem hiding this comment.
Thanks for your interest in svelte-adapter-bun!
Please take a look at the previous commit — several users tried running the adapter with Node.js (#76), which caused errors.
Because of that, I reverted back to using the Node.js file handling methods instead of the Bun API read and write.
|
Hi, thank you for the quick response. This is very interesting to me. What is the point of having a bun adapter if people are still using it with nodejs. That is like requesting the adapter vercel to be compatible with cloudflare. If there is no way of changing your mind in this specific topic. I think I can make it work with both. Although to me this is very counter intuitive. Let me know what you think of this. |
|
@maximehuylebroeck I think it's more like you're working on aarch64 machine and build code for x86, i mean doesnt Bun have custom implementation of fs under hood? so its the same efficiency but different interface |
|
It might be a very light translation layer, but I too don't think supporting node makes a lot of sense here. The future might bring more benefits from a native Bun.file implementation. I think we should always strive to get as close to bun native as is possible! ;) |
Hi,
Noticed there were some more node file based statements still in the code.
I've refactored these and tested the adapter with the demo example.