-
Notifications
You must be signed in to change notification settings - Fork 50
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
Deployment instructions to local server missing, either with node and bun #42
Comments
I think it would be better to do this in Vite-build layer. For reference, I wrote a simple Vite plugin, so could someone please try it? https://gist.github.com/laiso/caa8f8ea18451763b70c9c8af9815230 |
I had abandoned the idea of using honox because I'm not well versed in vite plugin development and didn't have the time to investigate and make it myself. I just tried the plugin in your gist and it work flawlessly! |
Thanks @laiso
We could create a package like |
If there are users who need it, I will open a pull request. Thanks |
Hi @laiso awesome resource your vite node config. I almost has it running but the assets are not working. You can see the repo here: Any idea of what could be wrong? |
@andresgutgon Your project's assets are located under static/assets/, so you'll need to reference them accordingly.
However, we must consider how to enable setting the default configuration in our vite-plugin. |
No but I have JS and CSS in 2 different places
With worker.use('/static/*', serveStatic({ root: './dist' })) CSS is loading fine but the |
thanks, I understand your problem, but I haven't figured out how to fix it yet. |
Solved. To make your Vite plugin work I put everything into https://github.com/latitude-dev/static-embedding-examples/blob/main/nodejs/vite.config.ts#L18-L20 So now I can build a Honox and deploy it to fly.io 🎉 Honesty this was harder than expected. But I have to say honox is very nice |
Good 👍 I also tried building it, and it works as expected. |
Above might work with Bun as well but I modified it a little to support Bun, React, and TailwindCSS. Didn't test thoroughly. https://gist.github.com/umstek/e87b1c2c2e0521fd44c7629e0c889301 |
It would be amazing to add a |
It looks like for now honox only supports building for cloudflare. I looked into the codebase and couldn't find a vite plugin to build for node or bun. Or at least instructions.
The text was updated successfully, but these errors were encountered: