Im getting error while deploying my react Vite app (Only shows white screen )

i tried deploying my app on vercel but the app only shows the blank white screen .

Is something wrong with my router configuration ?
its not showing my app.

when i run with npm run dev it shows me the correct ui ,
i also tried with npm run buld and previewed with npm run preview it shows me everything correctly .

but when i diploy it only shows me the white screen.

My vite.config.js

import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
  plugins: [tailwindcss(), react()],
  base: "/",
  build: {
    outDir: "dist",
    assetsDir: "assets",
  },
});

also i have included homepage in package.json

{
  "name": "smartkyc-admin",
  "homepage": "https://projects.vercel.app/",
   ....
   ....
}

This is what my folder structure looks

My vercel.json file

{
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}

My App.jsx file for reference

import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
import { Toaster } from "react-hot-toast";
import Dashboard from "./pages/Dashboard";
import Login from "./pages/Login";
import Signup from "./pages/Signup";
import Layout from "./components/Layout";
import { AuthProvider, useAuth } from "./contexts/AuthContext";
import PropTypes from "prop-types";
import "./index.css";

function PrivateRoute({ children }) {
  const { user } = useAuth();

  if (!user) {
    return <Navigate to="/login" replace />;
  }

  return children;
}

PrivateRoute.propTypes = {
  children: PropTypes.node.isRequired,
};

function App() {
  return (
    <AuthProvider>
      <BrowserRouter basename="/">
        <Toaster position="top-right" />
        <Routes>
          <Route path="/login" element={<Login />} />
          <Route path="/signup" element={<Signup />} />
          <Route
            path="/*"
            element={
              <PrivateRoute>
                <Layout>
                  <Routes>
                    <Route path="/" element={<Dashboard />} />
                  </Routes>
                </Layout>
              </PrivateRoute>
            }
          />
        </Routes>
      </BrowserRouter>
    </AuthProvider>
  );
}

export default App;