Closed AnkurSaini07 closed 1 month ago
Hi @AnkurSaini07
Maybe, this is out of the scope of @hono/vite-dev-server,
but about the usage of Vite. If you share a minimal project to reproduce it, I may investigate it.
Hi @yusukebe this is the git repo https://github.com/AnkurSaini07/vanya-engineering-works just run "bun i" and then "bun dev" to run project with vite-devserver open the url: http://localhost:5173/ you will see the error in console "GET http://localhost:5173/src/images/logo.svg?import&react net::ERR_ABORTED 404 (Not Found)"
@AnkurSaini07
Thanks! Try this vite.config.ts
:
export default defineConfig({
plugins: [
// ...
devServer({
exclude: [/\/src\/images\/.+/, ...defaultOptions.exclude], // <=== update this line
adapter: bunAdapter,
entry: 'src/index.tsx'
})
],
// ...
})
Thanks, @yusukebe! It works.
@AnkurSaini07
Good. Closing this issue.
I am using hono js, to develop a SSG website https://github.com/AnkurSaini07/vanya-engineering-works
The issue comes only when i run hono/vite-dev-server "bun dev", not on build
While SSR works fine, when I try to hydrate the app on the client side, it fails. I get the following error in the console:
GET http://localhost:5173/src/images/logo.svg?import&react net::ERR_ABORTED 404 (Not Found)