# Vite vs webpack: source lines of code compared

As of 2026-09-10, vitejs/vite contains 106,817 total lines (80,973 code) across 2,014 files, while webpack/webpack contains 366,057 total lines (222,565 code) across 1,675 files as of 2026-09-07. webpack/webpack is about 2.7x the size of vitejs/vite by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [vitejs/vite](https://octocounts.com/github/vitejs/vite) | [webpack/webpack](https://octocounts.com/github/webpack/webpack) |
| --- | ---: | ---: |
| Files | 2,014 | 1,675 |
| Total lines | 106,817 | 366,057 |
| Code lines | 80,973 | 222,565 |
| Comment lines | 13,245 | 116,873 |
| Blank lines | 12,599 | 26,619 |
| Languages counted | 12 | 12 |

Top languages in vitejs/vite: TypeScript (57.8% of code), YAML (14.5% of code), JavaScript (11.1% of code). Top languages in webpack/webpack: JavaScript (84.5% of code), TypeScript (8.8% of code), JSON (6.4% of code). TypeScript, YAML, JavaScript, JSON appear in both top language lists; CSS appears only in vitejs/vite's top languages; HTML appears only in webpack/webpack's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. vitejs/vite was counted at ref main (commit 99bd9d1d4615) on 2026-09-10; webpack/webpack was counted at ref main (commit 9cb49ef1474b) on 2026-09-07. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

vitejs/vite is the Vite core repository — dev server, build pipeline, and their plugin/rollup integration — while webpack/webpack is the webpack core; loaders, plugins, and the surrounding ecosystems live in separate repositories for both tools. The two counts are therefore comparable as core-tool source trees, counted on the dates in the methodology line.

Vite core is written predominantly in TypeScript, matching how it presents its public plugin API, while webpack core remains largely JavaScript; the per-language tables make the difference measurable rather than anecdotal.

Webpack's two-decade head start shows up as proportionally more comment lines and fixtures relative to its code lines in the table above — material written to explain and protect a widely-extended codebase.

_These counts do not measure build speed or output size for your project: performance depends on the toolchain version, plugin set, and application shape. A smaller tool source tree does not build faster._

Sources: [vitejs/vite repository](https://github.com/vitejs/vite) · [webpack/webpack repository](https://github.com/webpack/webpack). Statements verified 2026-09-08.

Evidence and next steps:

- [vitejs/vite SLOC report](https://octocounts.com/github/vitejs/vite)
- [webpack/webpack SLOC report](https://octocounts.com/github/webpack/webpack)
- [Compare vitejs/vite and webpack/webpack interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fvitejs%2Fvite&right=https%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack)

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, vitejs/vite or webpack/webpack?

webpack/webpack has more code: 222,565 code lines versus 80,973 for vitejs/vite, about 2.7x as much, based on cached OctoCounts reports as of 2026-09-10.

### 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 vitejs/vite, webpack/webpack, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. vitejs/vite was counted at ref main (commit 99bd9d1d4615) on 2026-09-10; webpack/webpack was counted at ref main (commit 9cb49ef1474b) on 2026-09-07. 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.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [OctoCounts API docs](https://octocounts.com/docs/api)
