How do modern build tools handle TypeScript vs tsc?

separating transpilation from type checking for speed. Great answer: fast native tooling strips TS per-file on demand via native ESM; browser loads only visited modules; tsc/ts-loader check/bundle the whole graph upfront.
WHAT THIS TESTS: Your understanding of the architectural trade-off between correctness and speed in development. Specifically, whether you know that TypeScript transformation can be separated from type checking, and that serving modules on-demand via native ESM eliminates the need to process the entire application graph before the first page load.
A GOOD ANSWER COVERS: Four points in order. First, modern tools like Vite transform TypeScript files individually as the browser requests them, using fast native tooling that strips types and lowers syntax without performing full type checking. Second, because the browser loads source code via native ES modules, only the modules needed for the current page are processed; the rest of the codebase is ignored until visited. Third, tsc and traditional ts-loader in Webpack must understand the entire module graph upfront, either type-checking everything or bundling all dependencies into a single artifact before serving, which makes startup time scale with application size. Fourth, the combination of no upfront bundling for source code and native-speed per-file transpilation means dev server startup is effectively constant time regardless of how many files exist in the project.
COMMON WRONG ANSWERS: Claiming that Vite uses tsc under the hood during development. Saying that the speed difference is only because Vite is written in Rust. Asserting that Vite pre-bundles application source code the same way it pre-bundles dependencies. Another red flag is ignoring the native ESM on-demand model and attributing everything to caching.
LIKELY FOLLOW-UPS: How do you surface type errors if the dev server does not check them? Why is bundling still used for production if ESM is fine for development? How does dependency pre-bundling work with large node_modules graphs? What trade-offs exist when you skip type-aware emit for features like const enum or decorator metadata?
ONE CONCRETE EXAMPLE: Imagine a project with thousands of source files. On first load the browser only needs the entry point and a handful of route modules. With Vite, those few files are transformed on demand and the server starts instantly. With a traditional Webpack and ts-loader setup, the bundler must crawl and compile the entire dependency graph before serving the first byte, so a large codebase can take tens of seconds to start. Type checking with tsc adds even more time, but in Vite's model it can run asynchronously without blocking the dev server.
Source: vite.dev
Read the original → vite.dev
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.