DEV Community

Discussion on: Migrating your React app from Webpack to Vite

Collapse
 
eissorcercode99 profile image
The EisSorcer

Why would one want to do this from a practical standpoint? Or rather, what are the use cases that requires this?

Collapse
 
elfsternberg profile image
Eλf Sternberg

Speed and control. Webpack, especially as part of create-react-app, is enormous, and it comes with dozens of side cases and plug-ins that you just do not need. Vite's build system is significantly faster and its dev server lighter weight, plus the plug-ins and features are limited to exactly what you specify, and nothing else.

Collapse
 
getsetgopi profile image
GP

You can create your own webpack config and not rely on RCA. We have created our own react starter kit, it's pretty small and has only what is need for the project. Creating webpack config is super easy and works great.

Thread Thread
 
elfsternberg profile image
Eλf Sternberg

That's true, and I don't disagree. My experience, professionally, has been that most web developers out of bootcamp start with create-react-app as they've been taught, and when the project grows to the point where it no longer serves them well, have to struggle with eject, cra-rewire, or manual migration. Webpack's config is easy to learn, but so is Vite's, and I find Vite's dev-UX just a bit more pleasant.