dumb question from someone re-entering the FE world: why is Vite necessary?
My understanding is it basically strips the type information using Go (IIRC) where your typechecking is then a separate step (without transpilation). So feedback is more rapid.
But, with tools like Deno or ts-node, where the type checking is apparently also off the hot path, why does Vite still exist?
Is it because it connects file monitoring with a dev server? Because it also somehow works non-js artifacts like CSS and image imports?
Ultimately, I've found the world of Vite + ESNext imports to be a world of frustration and pain. And, I really want to like Deno, and a lot of it is magical, but ultimately, there's just some splitbrain stuff going on with Deno's concept of a monorepo and their inability to commit to their public projects (e.g. Fresh) leaves me concerned it's risky to build on top of.
(ok, that turned into a rant, but there are some questions in there.)
It is also a bundler and minifier and dead code tree-shaker. It combines all your modules into one file (or a few) for production. In development it doesn’t do the bundling part (for now — with Rolldown[0] replacing Rollup[1] in the future, bundling will be fast enough to do the same in dev and prod).
It also serves as an integration point for other kinds of tooling that involves processing or generating code. For example, the latest versions of React Router[2] (which now integrates Remix's features) and Tailwind[3] are designed primarily to be integrated into projects as Vite plugins.
My understanding is it basically strips the type information using Go (IIRC) where your typechecking is then a separate step (without transpilation). So feedback is more rapid.
But, with tools like Deno or ts-node, where the type checking is apparently also off the hot path, why does Vite still exist?
Is it because it connects file monitoring with a dev server? Because it also somehow works non-js artifacts like CSS and image imports?
Ultimately, I've found the world of Vite + ESNext imports to be a world of frustration and pain. And, I really want to like Deno, and a lot of it is magical, but ultimately, there's just some splitbrain stuff going on with Deno's concept of a monorepo and their inability to commit to their public projects (e.g. Fresh) leaves me concerned it's risky to build on top of.
(ok, that turned into a rant, but there are some questions in there.)