⚡Vite 5 Released: Builds 2–11% Faster

Tom Smykowski
4 min readNov 29, 2023

The new Vite release improves the build time for the sake of all CI/CD operations!

Vite 5 was just released. It begs a question if it’s faster than Vite 4. As we can read:

On top of Rollup 4’s build performance improvements (…)

Let’s see if Rollup 4 really improves build time in Vite 5!

Initial Experience

Install

I’ve created Vite 5 and Vite 4 Vue projects:

pnpm create vite@4.4.1 vite4.4.1 --template vue
pnpm create vite@5.0.0 vite5.0.0 --template vue

And installed dependencies.

For Vite 4.4.1 it took 5.7s, for Vite 5: 13.7s.

Start

Starting Vite 4 took 2891ms:

$ pnpm dev

> vite4.4.1@0.0.0 dev C:\Users\TOMEK\Documents\Biznes\Moje\VSCode\Vite\Vite 4\vite4.4.1
> vite

Port 5173 is in use, trying another one...

VITE v4.4.5 ready in 2189 ms

➜ Local: http://127.0.0.1:5174/
➜ Network: use --host to expose
➜ press h to show help

Next starts: 678ms, 702ms, 711ms.

Starting Vite 5 took 1735ms:

$ pnpm dev

> vite5.0.0@0.0.0 dev C:\Users\TOMEK\Documents\Biznes\Moje\VSCode\Vite\Vite 4\vite5.0.0
> vite

Port 5173 is in use, trying another one...

VITE v5.0.0 ready in 1735 ms

➜ Local: http://127.0.0.1:5174/
➜ Network: use --host to expose
➜ press h + enter to show help

Next starts: 788ms, 800ms, 801ms.

Vite 5.0.0 looks slower here.

Build

Vite 4.4.5 build took 1.59s, 1.61s, 1.63s:

vite v4.4.5 building for production...
✓ 16 modules transformed.
dist/index.html 0.45 kB │ gzip: 0.29 kB
dist/assets/vue-5532db34.svg 0.50 kB │ gzip: 0.31 kB
dist/assets/index-fc5f319f.css 1.30 kB │ gzip: 0.67 kB
dist/assets/index-d7bd537c.js 51.54 kB │ gzip: 20.90 kB
✓ built in 1.59s

Vite 5.0.0 build took 1.5s, 1.48s, 1.34s

vite v5.0.0 building for production...
✓ 16 modules transformed.
dist/index.html 0.46 kB │…

--

--

Tom Smykowski

I will be able to write the next article when 9 people will become a member. Become a member now: https://medium.com/membership/@tomaszs2