If you really want "insource": false, take a look here: https://github.com/jihchi/vite-plugin-rescript?tab=readme-ov-file#using-loader. The loader functionality of this vite plugin was made to tackle the exact issue you are having.
↧
Rescript Vite project with insource: false
↧