When I talk with people who have been doing web development for a while, they always seem to complain about contemporary tooling.
Modern Life = Unnecessary Complications
The way they tell it, if we want to use one library, let alone a framework, it always brings along seven more dependencies. They constantly morph and squirm underneath our program’s surface, like the bugs that make up the Oogie-Boogie Man.
Make sure everything is included, and all the extras your new addition rely upon are also included.
But it has to be compatible! So run it through a system that dumbs the code down for older browsers, including outdated efforts at adding modules to JS.
But it has to be slim! So minimize it into a weird garbled JS blob.
And prune the stuff you included but never used! “Tree-shaking.” A real term.
No, I Really Do Need This
So we have more tooling. Traditionally, webpack. And that seems to work fine. A good build system keeps track of things, keeps their changes stable, and abstracts away some of the management a programmer does not want to think about.
Vite, which rhymes with yeet, helps clear away some of the extra lifting. And it’s small and quick.
Sometimes you like a tool because it does the thing you need to get done. Nothing else works quite correctly. So your tool, gawky and uncomfortable it may be, still becomes beloved.
Sometimes the fondness comes from how easy something fits into your workflow. You aren’t constantly adjusting or switching contexts; you just work. The tool gets out of your way.
Live Updates: Hot Reload
When using a framework with Python, I got used to having what was in my browser update when I changed my code. I’d type something as simple as
$ flask run * Running on http://127.0.0.1:5000/
Done. (And in debug mode, it provides an in-browser debugger. Python is pretty neat!)
Anyhow, it’s a wonderful quality of life feature. I was “well chuffed” when I encountered it in the old Vue CLI, and even more when it zipped along with Vite. And just as easily:
$ npm run dev
And a final produce, suitable for serving statically or running from a Node server, is as easy as
Just a Taste
There is a lot more to Vite, and to the choices one may make creating a web app. It seems to have set out to simplify development (less waiting, fewer reloads). But in the process, it also seems to provide Build People with a simple tool that just gets out of the way.