title: Cannot GET /xxx.html when I try to load a HTML file using window.location.href in Vite
body: <p>I'm developing a project where I need a authentication system, I'm using firebase to for that.<br />
  I don't want the login form to appear if the user is already logged.<br />
  So I did it:</p>
  <p><a href="https://i.stack.imgur.com/ZOEuX.png" rel="nofollow noreferrer">This code</a></p>
  <p>It works just fine, but when I use: <code>npm run build</code> and <code>npm run preview</code>, the <code>index.html</code> file works properly, but when I try to go to the <code>main.html</code> page, I get a <code>Cannot GET /main.html error</code>.<br />
  I could use React and React-route to do that, but I can't, it is a work for college and I have to use plain JavaScript.<br />
  I'm allowed to use firebase and vite.<br />
  If I can't make it work I will give up of vite for now and use firebase only. What do you guys think?</p>
  <p><a href="https://i.stack.imgur.com/3AYT5.png" rel="nofollow noreferrer">Vite Folder structure</a><br />
  <a href="https://i.stack.imgur.com/Qu2W0.png" rel="nofollow noreferrer">Error</a></p>