Hacker News new | ask | show | jobs
by merb 466 days ago
I‘m pretty sure that a lot of vite users with hot reload will run tsc inside the browser (tanstack, react-router)
1 comments

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.