-
Notifications
You must be signed in to change notification settings - Fork 28
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
[@hono/vite-dev-server] simple bun usage fails #107
Comments
That's a known issue, not a bug. |
@yusukebe @ceopaludetto, I was running into the same problem and I figured out why it's happening. Here is where Bun defines Response. I don't know Zig, but as you can see, it's aliasing the JS class to a Zig class: Here is where
I think what's going on is that when If you comment out the above lines in @yusukebe, maybe the best solution is to figure out how to remove the dependency on |
Hi @ersinakinci Thank you for investigating and creating the PR. I have some thoughts. I'll try to find the best way after coming back from my trip. Please wait a little. |
No worries! Thanks for your quick reply and for making Hono. I don't think that my approach in my PR is very good, too much code duplication. But I don't know the internals of Hono or Vite well enough to make a better solution. I hope that it's inspiration. |
One more important finding. I get the same bug during dev when I import anything from My current workaround is to import what I need from |
Does this issue occur when you are running the HonoX app on Bun? Anyway, as mentioned honojs/node-server#154, if it has |
@yusukebe yep it happens when you run
Yay! I saw that the PR moves the class override into a function call, so it should no longer execute as a side effect when importing files within |
When I do a simple vite configuration to use with hono, like this:
My
server.ts
:Running with
bun --bun vite
I got bun default feedback:
But my
console.log("HERE")
is executed. Reproduction: https://codesandbox.io/p/devbox/bun-vite-hono-repro-dwzcnvThe text was updated successfully, but these errors were encountered: