In the Github issue, there is a suggestion to use the ASCII encoding: https://github.com/vitejs/vite/issues/13676
If a file has only Latin characters and numbers, there are more chances it will work with different encodings.
So, you can try something like this:
export default defineConfig({
plugins: [vue()],
esbuild:{
charset: 'ascii'
}
})