I would like to run a vite react app locally in production mode? What is the best way of doing it?
Go to package.json file of you vite react app.
modify your script like that :
{
"scripts": {
"build": "vite build",
"serve": "vite preview"
}
}
then run :
npm run build
npm run serve