News for hackers. Stuff that matters.
Re:A 10x Faster TypeScript by merb on Tuesday March 11, 2025 @05:22PM (#43337139)
Iā€˜m pretty sure that a lot of vite users with hot reload will run tsc inside the browser (tanstack, react-router)
Re:A 10x Faster TypeScript by jchw on Tuesday March 11, 2025 @06:28PM (#43337792)
I am not a Vite expert, however, when running Vite in dev mode, I can see two things:

- There is an esbuild process running in the background.

- If I look at the JavaScript returned to the browser, it is transpiled without any types present.

So even though the URLs in Vite dev mode look like they're pointing to "raw" TypeScript files, they're actually transpiled JavaScript, just not bundled.

I could be incorrect, of course, but it sure seems to me like Vite is using ESBuild on the Node.JS side and not tsc on the web browser side.