I need to redirect to the home of a react project on Netlify but I'm using vite.
I used to do it using CRA (create-react-app) and creating the _redirects file in the public folder with this configuration.
/* /index.html 200
How would I do it in vitejs?
Try creating a netlify.toml file in root directory.
in netlify.toml
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
You could create the same _redirects file in the root and then modify build script to add it to dist folder like below
"build": "vite build && cp ./_redirects ./dist/_redirects",