#What is vite and what is it used for?

1 messages · Page 1 of 1 (latest)

jolly fjord
#

Hello, I'm currently learning react and I came across the term vite. I wanted to know a bit about it, can someone explain what it is, what it does and why do we need it please, what would happen without vite?

#

I read that there are terms such as webpack and rollup, what are these? Are they related to vite?

crisp portal
#

"Webpack", "rollup", "esbuild", "parcel", etc. are Javascript build tools that helps you bundle, minify, and transpile code, so that you can develop easier. They are different projects made by different people, but all under the same intention of building your JavaScript

#

Webpack has slowly fallen out of popularity due to its complexity

#

Vite is another tool that uses both rollup and esbuild. And with some additional benefits like a Hot Module Reload server, and a plugin ecosystem

jolly fjord
#

yep I see, thanks ! will have a look at the blog

arctic iron
#

Oke already provided information about what Vite is, so I won't repeat that, but I will discuss its relationship to React. In the past, the official recommendation for creating a React project was via create-react-app. This is now officially deprecated and hasn't even been recommended for several years. The recommendation in the official React website is to use Vite to create React projects, although they strongly recommend that you use Next or Remix instead of plain React.

jolly fjord
#

yep I see, thanks ! By the way, is there a reason for the recommendation ?