Vite React Deployment

I currently do:

Build Command - yarn
Start Command - yarn start --host

But this seems to use the dev server instead of a production build. What should be the build and start commands for a production build?

Vite apps should be deployed as a static website rather than a web service.

1 Like

Hi there,

Vite apps can be either a static site or a web service, it just depends on how you have configured your app. There is more leg work to get your Vite app served through something like Express.

The reality is though it will be easier to do this via a static site. Though your build command would need to be something yarn && yarn run build or npm install && npm run build depending on your package manager of choice. You would need to use a web service if want to run your front and backend through a single service.

Regards,

Keith
Render Support, UTC+10 :australia:

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.