This gist has most of the things I've used to develop the frontend using vite inside a monolithic django app.
A couple of things to note:
- it runs in SPA mode by default. If you want SSR, you may want to look into django_vite;
- static files unrelated to your app, like images or fonts, should be served by django, instead of imported directly inside your frontend app;
- you'll need to enable manifest in your vite configs for production;
I've only tested this with a React app, but I'll share my notes when testing with a Svelte app later.