Replies: 1 comment 4 replies
-
If you are building an application that only runs on a single Node.js server, the Env API doesn't add much features. It has a more consistent design and the ability to run the build for Node and browser in a single
No, Vite only handles the bundling part.
Yes, but you need to call the SSR APIs from the rendering frameworks and connect it to the client bundle on your own.
Yes, Vite can still handle that.
The dev setup will be something like the example in https://vite.dev/guide/api-environment-frameworks.html#default-runnabledevenvironment. The build setup will be something like the example in https://vite.dev/guide/api-environment-frameworks.html#environments-during-build. |
Beta Was this translation helpful? Give feedback.
-
The new Environment API seems great, but I have a question — how would that work when you want to have a production server with middleware, for example, and other custom functionality?
Let's say that I want to build something similar to WordPress — an app that has the following responsibilities:
For simplicity, let's say that all of the above happens on production on just on a single Node.js server. No Cloudflare workers and other cloud stuff. Just like WordPress — one PHP server and that's it.
How would Vite fit in such a project? Which parts would it be able to handle and which ones would I have to take care of myself?
In general, how would you build something like that with the new Vite?
I just trying to get my head around all that and figure out how the new stuff in Vite would work. I'm excited either way, though! Thank you!!
Beta Was this translation helpful? Give feedback.
All reactions