4 ms·
Vite uses esbuild under the hood. It can also create bundles with all your deps, which is essential when you don't want an npm i step involved during deployment
by arbol 2y ago
Vite uses esbuild under the hood. It can also create bundles with all your deps, which is essential when you don't want an npm i step involved during deployment (lambdas/containers).
- Aldipower 2y agoTo be clear, it is esbuild that bundles not vite. esbuild index.js --bundle --outfile=build.cjs --format=cjs --platform=node You can use pkg then to make this bundle executable. pkg build.cjs This is not vite. :-)
- arbol 2y agoFair point. But vite makes this easier than esbuild. I get a bundle that's immediately executable with node
- silverwind 2y agoVite uses esbuild only during development, in the build it uses rollup.
- auggierose 2y agoYes, I've noticed that. So to debug problems I need to know both rollup and esbuild, and how exactly Vite configs boil down to configs for these two.
- solarkraft 2y agoHas this happened to you? I expected this to happen to me, but I’ve never noticed a disparity.
- auggierose 2y agoI've run into problems with Vite when I was using it for electron, and I could not figure out how to fix it. I needed to create a new project from scratch. Vite seems in general to be fast moving, and software depending on it breaks easily.