Laravel vite manifest not found on deployment

I got this error when I tried to deploy my Laravel site that using Vite on Forge

(Exception(code: 0): Vite manifest not found at ..)

This problem might be happen to other deployment as well, not just at Forge


  1. Run build on locally
npm run build
  1. Allow build files on .gitignore

*I add excalanation mark there. To allow public/build, which is files generated by Vite


Notes: if you’re using something like sass, also check this out Solve unable to locate Vite file manifest sass