I’ve deployed my backend on Render.com, but I'm having issues getting my frontend to work on both Vercel and Netlify. The latest attempt was with Netlify, but I encountered the same problem.
I'm using Vite with the Create React App command to build my app, along with React Router for client-side routing and Axios for making API requests to Render.com. Below are my package.json and file structure for reference:
THIS IS MY GITHUB REPO:
https://github.com/codingcreedd/messagingAppTOP
I tried adding "homepage": ".", "" and "./" but none of them worked. I tried using CI=false as an environment variable in netlify and in my package.json but it also failed. I also tried creating a _redirects file in the public directory, but nothing worked.
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: "https://whatsuptop.netlify.app/src/main.jsx",
});
this is my vite.config.js file as well if it helps