If you just want esbuild + hot reloading then dev-server-esbuild might be a good option: https://modern-web.dev/docs/dev-server/plugins/esbuild/ But really vite isn't much more complex or opinionated compared to it.
"scripts": {
"build": "esbuild src/app.ts src/app.css --bundle --sourcemap --outdir=site",
"dev": "npm run build -- --servedir=site",
}
Unless you mean something different by "hot reloading" than "recompile on page reload?"It's really a magical experience to have your code open in one window, your browser open next to it, and as soon as you hit ctrl-s instantly see the page change. I won't tweak CSS any other way, changing sizes, colors, etc is amazing with hot reload.
https://vitejs.dev/guide/why.html#why-not-bundle-with-esbuil...
> While esbuild is blazing fast and is already a very capable bundler for libraries, some of the important features needed for bundling applications are still work in progress - in particular code-splitting and CSS handling. For the time being, Rollup is more mature and flexible in these regards. That said, we won't rule out the possibility of using esbuild for production build when it stabilizes these features in the future.
Overall, ESBuild feels like a much lower-level tool than Vite. It's great for smaller projects or projects that require absolute and complete control over their builds, but it takes more time to setup in most cases and often requires writing your own build scripts.
I suppose it wouldn't scale if the app got too big and complicated.
[1] https://github.com/skybrian/serialviz/blob/main/package.json
If I don't write my own build scripts how else am I going to show my coworkers how big brained I am? I need to assert my intellectual superiority somehow...
I think of Vite as a bundle of esbuild and other tools glued together nicely into one thing which can manage your entire project.