I have deployed react apps previously with the following setup, but with Vite seems not to work:
Root directory: Blank (Using src folder)
Build command: npm run build.
Publish directory: build.
Github repo at the moment is private, does this affect in anything?
Does someone has an example to deploy simple Vite app in render?
Appreciate the support.
The default build output for Vite is
dist, so we would recommend trying that, unless a specific
build.outDir is specified. See https://vitejs.dev/guide/static-deploy.html#deploying-a-static-site for more details.
Thanks for the support @jade_Paoletta. I’ve got it to advance but not completely, now the error is vite: not found. Still figuring it out.
Hi Joe, have you figured it out yet? I have this same issue
Hi @damilola1ade, yes I did. In the field of build command you should have npm run build, and in the publish directory you should have the dist folder. Just write dist.
Hope it’s helpful.
Thanks this helped me deploy my Vite app (with pnpm)
Running build command ‘npm run build’…
npm ERR! missing script: build,
I’m getting this error what should I do