Member-only story
Is It Time To Say Goodbye To Webpack?
Before we answer the big question, let's look at why we are even considering it.

If you look at bestofJS data for 2021, you would see that the rising star in the build tools category is Vite
, leaving Webpack
far behind in terms of popularity.
Check out more stats here:
2021 JavaScript Rising Stars

Let's have a closer look at Vite
Vite (French word for “quick”, pronounced /vit/, like “veet”) is a build tool that aims to provide a faster and leaner
development
experience for modern web projects.
Please note the emphasis on development
. Vite
does not promise a multifold optimization or better production experience. So don't expect your production build to be optimized or any drastic reduction in the bundle size you generate.
So what does Vite
do to make the development experience better?
It consists of two major parts:
- A dev server that provides rich feature enhancements over native ES modules, for example extremely fast Hot Module Replacement (HMR).
- A build command that bundles your code with Rollup, pre-configured to output highly optimized static assets for production.
Vite
is opinionated and comes with sensible defaults out of the box, but is also highly extensible via its Plugin API and JavaScript API with full typing support.
It has been long since we have been writing JS code in a modular fashion especially since ES6 modules. Since not a lot of browsers were handling loading ES6 modules natively, we have the concept of bundling our code, using tools that crawl, process, and concatenate our source modules into files that can run in the browser.
Tools like Webpack, parcel & rollup do the same job.
When you start a project, the size & number of JS modules may look like a smaller problem but as you write more code, the project grows & you see that starting a dev server takes a long time.