cyco130 / vavite

Develop server-side applications with Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Future of Vavite, Vite 3 and vite-plugin-ssr

Ontopic opened this issue · comments

First, thanks for your extensions to Vite, really makes it a golden choice!

This is not really an issue, more an attempt to get some insights into the updates surrounding Vite 3, Vavite and vite-plugin-ssr.

I'm personally facing an issue for the base / root folder for this new combination, but I can hopefully hack myself through that for now and post a separate issue/fix for it later on. It's more that I'm feeling uncertain whether or not I should focus on getting these 3 tools to work together in my setup at the latest version, or perhaps stick to a Vite 2 with just vite-plugin-ssr, and keep vavite out of it until things are more "mature"?

I understand the "risks" involved nonetheless of working with the latest tools, some insights on the "readiness" of this setup would be very helpful though! So I at least know I'm focussing my efforts in the right place ;)

And would a betting-man that likes to run canary versions maybe switch to hattip yet, for example

edit: It appears my issues stem from the way Yarn Berry deals with the node_modules folder. switching to pnpm fixed them. Question about the recommended way forward; I would still very much appreciate some insights into the recommended setup for someone living on the edge.

Hi!

vite and vite-plugin-ssr are of course used in production by many. But I'm not aware of anyone using vavite for a user-facing production application yet (I do use it for a company internal tool though). Having said that, vavite is mainly a development tool. It does very little in production, so I don't think it would be an issue.

I think Vite 3 brings a lot of improvements and vite-plugin-ssr 0.4 integration feels much cleaner than before. So if it was me I would upgrade if it's not a critical application.

would a betting-man that likes to run canary versions maybe switch to hattip yet

You're welcome if you're willing to take risks :) There is a vite-plugin-ssr example there too now which runs on Node and Bun (and possibly others, I haven't tried yet). To be honest, I don't think it offers much over Node at this point unless you're aiming to deploy to a worker environment (which I haven't tried with vite-plugin-ssr).

facing an issue for the base / root folder

I'd be happy to try to help if you can give more details.

Exactly the kind of update I was hoping for! Thanks a lot.

edit: I didn't even properly check the last hattip example before I said that 🤤 Seems that sample really supersededes my question, just hours before I started this issue. Feel free to close it, or leave it open for me to pester you about the latest developments ;)

edit: I will actually use workers a lot, one of the first things I'm gonna try to setup properly within your sample. Hopefully even being able to share worker code between node and the browser, through threadjs, otherwise falling back to trpc or websockets with proxies (socketless). All completely out of scope here, but if you got any more advice in that direction; I'm all ears! Any pro-tips on integration with Electron (for building Electron code though Vavite) would also be much appreciated.

Now, it feels only fair that whatever I get working I contribute somewhere. Let me know if there's a preferred way to go about that, or if you prefer me just posting here what I end up with (or at least the working parts :))

Open issues give me anxiety so I'm gonna close this one :D Feel free to contact me on Discord > Cubes # HatTip.

Contributions and pull requests are always welcome!