To be fair, vite does a lot of the heavy lifting when it comes to supporting extra frameworks. If you look at the code required for astro to integrate with a new technology you'll see it's relatively straightforward.
For example, here's all the code in the svelte integration: https://github.com/withastro/astro/tree/main/packages/integr...
Wow. Good callout.