ISSUE 067  ·  17 NOVEMBER 2026 ELEN RSS
CodeCity
DEVELOPMENT № 0063

Vite: fast local dev server and a production bundler

a tool that keeps your website code on a local server while you work so every saved change appears in the browser immediately, and when you're done it collects all files into a few small, upload-ready artifacts.

Vite: ο τοπικός server που σου δείχνει κάθε αλλαγή αμέσως

What it does

Plainly: it keeps your website code alive on a local server while you work, and when you are done it gathers all files into a few small, upload-ready artifacts. Two things change in your day: during development every change appears in the browser without a page reload, and at the end you get a compact, optimised set of files for your server or a CDN.

What “local server” means in practice. It is not a server on the internet, it uploads nothing anywhere, and it has no address anyone else can see. It is a small program that opens an address on the computer where you work — usually something like localhost:5173 — and serves your project files to a browser you open yourself. Close it and the address is gone. So the tool adds no upload step to your work: you open the browser and see what you just wrote.

What you see with Hot Module Replacement. HMR is the mechanism that replaces only the part of the code that changed, without reloading the whole page. In practice: you save the file, the change appears, and the state of the page survives — the form you had filled in stays filled, the scroll position stays where it was, the panel you had open does not close. Anyone who has worked with “save, switch to the browser, hit refresh, click the same three things again” understands the difference immediately: the number of cycles does not fall a little, it falls by half.

What “bundling” means for the final upload. During development your code is a scatter of files, convenient to work in. At the end, a program called a bundler reads them all, follows their dependencies, drops what is never used, and glues them into a few final files. That shows up in two numbers: fewer requests from the browser (a page with a hundred files takes longer to start) and less total weight, because code that never runs is removed.

And one thing that explains its current shape: Vite is really two tools in one. The first is the development server, which wants to answer instantly, so it bundles nothing — it serves files as they are, transformed one at a time. The second is the production build, which wants to be as small and as fast as possible and has nothing to do with what you see. A tool for the working day is not the same as a tool for the last second before uploading, and Vite treats them separately.

Technically: Vite’s dev server serves files as ES modules and implements HMR. It transforms each file at the moment the browser asks for it (on the fly) and enriches the response with source maps, so your debugger reads the original source and not the transformed result. For the production build, Vite delegates bundling and minification to a compiler that in version 8 is rolldown, written in Rust. That is also the most visible sign of the change: build errors now come out of rolldown files, as the test below shows.

What it does not do

It is not the tool for packing a single standalone script into one file. If you have one small JavaScript file and simply want it compressed, lighter tools exist that install and run faster, without dragging a whole dependency chain along.

It does not replace your framework. It is not React, Vue or Angular, and it does not replace their runtimes: it works with them through templates and plugins, but Vite draws nothing on its own — it produces no environment and holds no opinion about how an application should be built. It is not a production server either: the files it emits are meant for a web server or a CDN, and the tool itself never stands on a public address.

It is not a security or audit tool. It does not scan for vulnerabilities, does not check accessibility, does not measure page speed and will not tell you whether your copy is readable. It does not make slow code fast: if your page does a heavy computation, the tool will deliver that computation to the browser quickly, not reduce it. It does not replace your tests, it does not replace linting, it is not a package manager and installs no libraries on your behalf. And it is not invisible: the local install brings dependencies and disk usage with it — measured below, fourteen packages and about thirty-six megabytes.

Two quick terms

bundler: a program that takes many source files and their dependencies and glues them into a few final files for production. It reduces the number of requests and often applies optimisations such as tree-shaking, that is, removing code that is never used.

dev server: a local server that serves your application during development, usually with fast reloads and HMR.

HMR (Hot Module Replacement): a mechanism that replaces only the part of the code that changed, without a full page reload. It preserves application state and shortens the working cycle.

production build: the process that turns source code into a version ready for deployment — usually compressed, without unused code, with source maps where needed.

rolldown: the compiler Vite uses for bundling and minification in version 8; written in Rust, and visible in the error trace when something breaks.

source map: a file that links transformed or minified code back to the original source, so you can read an error in the code you actually wrote.

Who it’s for

For the person who builds websites and spends the day writing JavaScript or TypeScript: the gain is the time not wasted on refreshes and waiting.

For the small team with no build pipeline of its own and no wish to assemble one: three commands, a server with live changes, and the final build from the same tool.

For the designer who ships interfaces and wants to see the work in a real browser without waiting for someone else to set up a development environment.

For anyone migrating an older project off other tooling: Vite accepts most well-known frameworks, and ready-made templates exist for new projects.

It is not for someone who wants one file packed into one file — a lighter tool is the better choice there. It is not for someone unwilling to have Node on the machine; without it, nothing starts at all. And it is not for someone looking for a ready-made production server or a framework.

Installation

Open a terminal inside your project folder and run three commands. The first creates an empty folder and enters it:

mkdir vitetest && cd vitetest

The second creates a minimal project settings file:

npm init -y

The third installs the tool as a development dependency, pinned to a specific version so it cannot change under your feet:

npm install --save-dev vite@8.3.6

You need Node 20.19 or newer, or 22.12 and above — the package itself asks for this in its engines field, the README does not, and it is the most common reason for an error on the first run. If you want to try it without keeping a local install, you can run one or two commands with npx, but the test described below uses a local install.

Usage from each LLM terminal

This is not an MCP server: you declare nothing to a model and no tool schema is loaded anywhere. It is a command-line tool, and its use from an assistant is written below from the shell — one command per block, ready to copy.

Claude Code

In the terminal Claude Code gives you, inside the project folder:

mkdir vitetest && cd vitetest
npm init -y
npm install --save-dev vite@8.3.6
npx vite
npx vite build

Codex CLI

The same steps from the Codex CLI console:

mkdir vitetest && cd vitetest
npm init -y
npm install --save-dev vite@8.3.6
node node_modules/vite/bin/vite.js
node node_modules/vite/bin/vite.js build

Cursor

In Cursor’s integrated terminal, or any other:

mkdir vitetest && cd vitetest
npm init -y
npm install --save-dev vite@8.3.6
npx vite
npx vite build

The difference between the two forms is small but worth knowing: npx vite will find the locally installed program if it exists, while node node_modules/vite/bin/vite.js calls the file you installed explicitly — and that is the exact form used in the test below.

Where it wins, where it loses

It wins in the working cycle. On-demand transformation and HMR mean a change appears with no waiting and no loss of page state; in a project with many files that is the difference between working and waiting a minute every time you save. That is the tool’s promise, and it is measurable with a single clock.

It also wins on popularity, with numbers that need no interpretation: 83,867 stars and 9,417 forks on GitHub, and 262,699,686 weekly downloads from npm. Anyone adopting it today can find answers, templates and people already using it.

It wins on the final result too: in version 8 the build goes through rolldown, written in Rust, and that shows in two places — the speed of the build and the small weight of what you upload. In my test the build took 77 milliseconds and the output was about 5 KB in total.

It loses on install footprint when the job is very small. npm install brought 14 packages and left about 36 MB in the dependency folder — disproportionate for a single small script. If you want bundling only, without a development server, esbuild does exactly that with a far leaner install: 40,122 stars, 415,003,286 weekly downloads, MIT licence, version 0.28.2 published on 08/08/2026, requiring node >=18 — and in narrow bundling jobs it is faster and smaller. We did not take it because it provides no development server: we would have had to add a second tool for our working day. It also loses in very large monorepos, where extra configuration is needed to handle all packages together.

Test

I took a minimal project — an index.html, a src/main.js calling a function from src/util.js, and inside util.js a word that exists nowhere else, TRAP-OK-35. That way I know that whatever appears in the final file is my own code and nothing else.

The steps, exactly as run:

mkdir vitetest && cd vitetest
npm init -y
npm install --save-dev vite@8.3.6
node node_modules/vite/bin/vite.js build

Installation took 15 seconds and left 14 packages and 36 MB in the dependency folder. The build transformed 5 modules in 77 milliseconds and produced a dist/index.html of 0.20 KB and a dist/assets/index-*.js of 0.97 KB raw, 0.55 KB compressed — 5 KB altogether. And the important part: the word TRAP-OK-35 was found inside the output file, so the tool really did bundle the code I wrote.

Then I deliberately added a file with an unclosed brace and rebuilt, to see what happens when something is broken. It exited with code 1, named the file and the line (line 2) and said what it expected: “`}` expected“. The error trace pointed at rolldown files, that is, the compiler now doing the work. The conclusion that matters: a broken build does not pass silently — it stops, says where, and leaves no valid output behind.

Finally, the local server. I started it and the first request to the page answered HTTP 200 in 41 milliseconds. I also requested one of the code files: it came back transformed, with the source map appended on a single line — so the browser sees something the debugger can map back to the original source. I did not measure the server’s start-up time, and I do not write it.

What it costs

It is not an MCP server, so it loads no schema into the model: zero tokens on either side. The cost here is disk, time, and one version requirement.

Measured in a clean folder: installation took 15 seconds and left 36 MB across 14 packages. The package itself is 2.27 MB with five direct dependencies. A production build of a small five-file project took 77 milliseconds and the result was 5 KB in total — 0.97 KB of JavaScript, 0.55 KB compressed.

The requirement: Node 20.19 or newer, or 22.12 and above — from the package’s engines field, not from the README. It needs no graphics card, no account, no key.

In money: zero. It is free software under the MIT licence. The expense is the time you save waiting for the project to rebuild — and you can only measure that on your own project.

Verdict

Vite delivers real productivity in day-to-day work. In the development cycle you save time and temper, because a change appears without losing page state. In the final build, the move to rolldown gives a fast result and a small upload weight. The price is the local install and the disk space, which for a single small script is out of proportion.

I would recommend it to teams and to projects where development speed and small final weight matter. I would not install it for a single file that merely needs compressing, nor where Node is not available. And if your job is bundling only, inside some automated pipeline, esbuild is leaner and faster — but it does not give you the development day.

Sources:

https://github.com/vitejs/vite

https://vite.dev/

https://github.com/vitejs/vite/releases/tag/v8.3.6