I have a react app that I made in ViteJS using JSX for its initial class and other components as well. When running npm start, the app works fine as it should. but when I try to build it using vite, nothing appears at first and I actually have to change the file paths from "/" to "./" in the html file, but after doing that all I get is the initial component that wraps the browser router and switcher. It doesn't handle any of the Links or components I added or even show the images I imported.
Development (What it should look like)
Final build
I am not sure why my components are gone after building. I've tried using webpack and babel as an alternative to try and build it a different way but the problem is still the same.
Main.jsx