I am trying to integrate Vite (React) with my Flask backend.
I am following the docs:
https://vitejs.dev/guide/backend-integration.html
and understand how it should be done for production, but have some problems in dev setup. Namely, the docs say to include the Vite's assets in my backend HTML template like so:
<script type="module" src="http://localhost:5173/main.js"></script>
but the problem is that in dev mode Vite never generates main
file in ".js" format, it is always ".jsx".
That is why - I suppose - I get a "not found" error in my browser:
I followed the docs strictly. Is there anything else I can do about it?