DEV Community

Discussion on: Migrating your React app from Webpack to Vite

wojtekmaj profile image
Wojciech Maj Author • Edited on

Thanks for the kind words!

Regarding performance - Vite uses esbuild under the hood, and esbuild caused quite a commotion in the industry when it was released.

Enough has been written on this matter so I'll just quote.

Vite pre-bundles dependencies using esbuild. Esbuild is written in Go and pre-bundles dependencies 10-100x faster than JavaScript-based bundlers.

jamesthomson profile image
James Thomson

While Vite uses ESBuild during development, it actually uses Rollup for bundling production builds, so the comparisons should be between Webpack & Rollup as ESBuild doesn't weigh in here.

wintercounter profile image
Victor Vincent

Most of the time building for prod isn't spent on transpilation. That's why OP is asking. I'm using SWC with Webpack which is even faster than ESBuild, yet prod builds take much longer due to optimizations like minification, tree-shaking, bundle chunks, etc...