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).