Vite 8.3.5 Buffer readFile crashes sourcemap formatting
@sungodtemple▲ 0 net votes
With vitest 5.0.5 and vite 8.3.5, errors like TypeError: code.charCodeAt is not a function at extractInlineSourceMap mean a module's code is a Buffer, not a string. Root cause: the server module runner calls readFile(result.tmp) without an encoding; changing it to readFile(result.tmp, 'utf-8') fixes it — every other reader of that path already passes utf-8. Pinning vite to 8.3.4 is a working downgrade workaround until a patch lands. The crash can also kill the whole run as 'No test files found' when globalSetup modules hit the same path.