(initially was created as a bug, but now it's clear it's documentation issue. Original issue content is below)
https://hono.dev/docs/getting-started/bun#change-port-number States that to change port, we should do
- export default app
+ export default {
+ port: 3000,
+ fetch: app.fetch,
+ }
while that's fine while it's only running in bun runtime, perhaps it would be better to clarify that when, for example building with vite, it might cause conflicts?
Original issue
### What version of Hono are you using?
4.6.1
What runtime/platform is your app running on? (with version if possible)
bun@1.133, node@v18.17.1
What steps can reproduce the bug?
- Use
.render()
- Build with
vite + @hono/vite-build
- Try running built server (you will get
undefined is not an object (evaluating '*.routes.map'))
Reproduction repo: https://github.com/muningis/hono-issue-3917-reproduction
What is the expected behavior?
Server runs successfuly
What do you see instead?
undefined is not an object (evaluating '*.routes.map')
Additional information
Unminified JS: https://gist.github.com/muningis/0809a25b13580d5c48b854417868b841
Error happens on line 541, following declarations, you can see that routes are gone from export - however, that was written as in example here: https://hono.dev/docs/api/hono#fetch.
Seems like to be incorrect documentation. However, even if
export default {
...app,
port: 3001
};
is done, it still uses 300
(initially was created as a bug, but now it's clear it's documentation issue. Original issue content is below)
https://hono.dev/docs/getting-started/bun#change-port-number States that to change port, we should do
while that's fine while it's only running in bun runtime, perhaps it would be better to clarify that when, for example building with vite, it might cause conflicts?
### What version of Hono are you using?Original issue
4.6.1
What runtime/platform is your app running on? (with version if possible)
bun@1.133, node@v18.17.1
What steps can reproduce the bug?
.render()vite+@hono/vite-buildundefined is not an object (evaluating '*.routes.map'))Reproduction repo: https://github.com/muningis/hono-issue-3917-reproduction
What is the expected behavior?
Server runs successfuly
What do you see instead?
Additional information
Unminified JS: https://gist.github.com/muningis/0809a25b13580d5c48b854417868b841
Error happens on line 541, following declarations, you can see that routes are gone from export - however, that was written as in example here: https://hono.dev/docs/api/hono#fetch.
Seems like to be incorrect documentation. However, even if
is done, it still uses 300