hono
hono copied to clipboard
How can i bundle hono app with esbuild?
I have been trying to bundle a hono app which uses jsx using esbuild. Can someone tell me the way to do this. I'm able to bundle but when i add that js file as script and run http-server it doesnt work as intended
Could you provide the minimal code of what you are trying to do? I'd like to assist if I can.
Could you provide the minimal code of what you are trying to do? I'd like to assist if I can.
It is a hono app based in node.js . I'm able to get the bundle.js file but i want to serve html pages I'm not sure how I can do that. Is there a way that i can bundle the html and css files and the ts code in a single file. I'm still working on this and making progress but any leads will be appreciated Thank You
Are you trying to output static files, similar to static site generation? Or is it that you want to deliver HTML with server-side rendering from Hono, referencing JavaScript or CSS built with esbuild?
If you're aiming for something like static site generation, Hono may not be suitable for that purpose. Hono is primarily a web framework and should be thought of as something akin to Express or Fastify, not like Next.js.
If you're comfortable sharing, could you show the code of what you're trying to achieve, even in an intermediate state?
I think we can close this issue.
If you have a question, please use GitHub Discussions or Discord. https://github.com/orgs/honojs/discussions