I started with the auth template, then added tailwindcss and now HMR and routing got all messed up.
When I now edit a route, by adding some tailwind classes to an element for example, the component does not get properly replaced with HMR. Instead, I just get a second component rendered next to the previous one.
And when I redirect to a different route, the same happens. The old route doesn't disappear, instead the new route just appears next to the old one.
Here's my repo that you can use to see the problem. I use pnpm, but I assume that doesn't matter. Just run pnpm install and pnpm dev and you should see the same that I got.
And here's a little video showing the problem:
https://user-images.githubusercontent.com/1267282/203319363-ae2163db-6ad1-40fa-a830-b8c84e37fc5f.mov
Edit
Oh wait, it seems to only happen to my login route. The home route does disappear like it's supposed to... Still, I don't understand why. I really don't think that I'm doing anything wrong....