I'm surely not maintaining this as well as I could. There are also other possible, better integrated solutions, like django-vite, so keep in mind this was supposed to be more of a note to myself than anything :]
This gist has most of the things I've used to develop the frontend using vite inside a monolithic django app.
Here's a boilerplate that uses this approach: https://github.com/labcodes/django-react-boilerplate
A couple of things to note: