Next.js vs Vite: source lines of code compared

The Next.js vs Vite comparison on OctoCounts shows side-by-side source line counts for vercel/next.js and vitejs/vite, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

This page compares the source lines of code (SLOC) of vercel/next.js and vitejs/vite using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-11-16, vercel/next.js contains 1,001,292 total lines (810,912 code) across 8,670 files, while vitejs/vite contains 110,505 total lines (84,057 code) across 2,133 files as of 2026-11-16. vercel/next.js has about 9.6x the counted code lines of vitejs/vite under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Metricvercel/next.jsvitejs/vite
Files8,6702,133
Total lines1,001,292110,505
Code lines810,91284,057
Comment lines92,89413,648
Blank lines97,48612,800
Languages counted2921

Top languages in vercel/next.js: Rust (35.7% of code), TypeScript (30.4% of code), TSX (10.8% of code). Top languages in vitejs/vite: TypeScript (59.3% of code), YAML (13.2% of code), JavaScript (11.1% of code). TypeScript, JSON, JavaScript appear in both top language lists; Rust, TSX appear only in vercel/next.js's top languages; YAML, CSS appear only in vitejs/vite's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. vercel/next.js was counted at ref canary (commit a19c4f99adc8) on 2026-11-16; vitejs/vite was counted at ref main (commit 9a8d1a98922c) on 2026-11-16. See the counting methodology for ignored directories and analysis options.

Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. vercel/next.js: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. vitejs/vite: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

About this comparison

Background observations recorded on 2026-09-08; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: vercel/next.js is the Next.js monorepo — the framework packages, examples, documentation site, and test suites — while vitejs/vite is the Vite core repository only. The comparison is framework-repository vs build-tool-repository: related layers of the stack, but not the same kind of software, and the contains were taken on the dates shown above.

The two counts describe different layers: Next.js is a framework that orchestrates rendering, routing, and data loading (and uses build tooling underneath), while Vite is that build tooling layer. Reading the numbers side by side is most useful as a sense of each project's reading and maintenance surface.

This is not a framework-vs-build-tool performance or popularity comparison. Source-tree size says nothing about which to choose; the decision depends on the application's rendering and build requirements.

Sources: vercel/next.js repository structure (monorepo with examples and docs) · vitejs/vite repository. Statements verified 2026-09-08.

Evidence and next steps:

Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

Compare FAQ

Which has more lines of code, vercel/next.js or vitejs/vite?

As of 2026-11-16, vercel/next.js contains 1,001,292 total lines (810,912 code) across 8,670 files, while vitejs/vite contains 110,505 total lines (84,057 code) across 2,133 files as of 2026-11-16. vercel/next.js has about 9.6x the counted code lines of vitejs/vite under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for vercel/next.js, vitejs/vite, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. vercel/next.js was counted at ref canary (commit a19c4f99adc8) on 2026-11-16; vitejs/vite was counted at ref main (commit 9a8d1a98922c) on 2026-11-16. See the counting methodology for ignored directories and analysis options.

Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.