Vite automatically inline assets in CSS in lib mode and this is hardcoded in it. After multiple approaches it seems that this one is the most trivial and easy-to-maintain one.