Hi dear Netlify support
I made a react project with Vite, which runs correctly on the local host and there is no problem, but when I take the build from the project and want to deploy it on Netlify, I get an error in the console (require is not defined), and the project does not run. This error is related to the JavaScript file that was compiled by build and Vite cannot read the require method. The reason for running on localhost is that localhost runs the project directly from the files itself, not from the build folder. I know maybe this question has nothing to do with your field of duties, but please help me because I went through many ways and it didn’t work. If I create the project with “create react app” and take the build and run it on Netlify, there is no problem, but I want to do this with Vite.
my project name “javadbahrami-reactmessenger”
Sincerely,
Javad Bahrami