Open-Source Wikis

/

Vue.js

/

Reference

/

Dependencies

vuejs/core

Dependencies

Vue's runtime is intentionally lean — most of the public packages have only @vue/* workspace deps. This page enumerates what each package brings in and why.

Runtime dependencies

Package Runtime deps Why
@vue/shared none Foundation package.
@vue/reactivity @vue/shared Helpers like extend, hasChanged, def.
@vue/runtime-core @vue/shared, @vue/reactivity Reactivity is the foundation.
@vue/runtime-dom @vue/shared, @vue/runtime-core, csstype csstype provides the type augmentation for the style prop in JSX.
@vue/runtime-test @vue/shared, @vue/runtime-core Same as runtime-dom but no DOM.
@vue/server-renderer @vue/shared, @vue/compiler-ssr The SSR helpers + the SSR compiler for stand-alone string render.
@vue/compiler-core @babel/parser, entities, estree-walker, source-map-js, @vue/shared Babel for parsing template <script> expressions, entities for HTML decoding, estree-walker for AST traversal, source-map-js for source maps.
@vue/compiler-dom @vue/shared, @vue/compiler-core Built on top of compiler-core.
@vue/compiler-ssr @vue/shared, @vue/compiler-dom Reuses compiler-dom's parser.
@vue/compiler-sfc @babel/parser, @vue/compiler-core, @vue/compiler-dom, @vue/compiler-ssr, @vue/shared, estree-walker, magic-string, postcss, source-map-js The SFC pipeline. magic-string for incremental edits, postcss for the style block.
vue @vue/shared, @vue/compiler-dom, @vue/runtime-dom, @vue/compiler-sfc, @vue/server-renderer The aggregate package.
vue-compat @vue/shared, @vue/runtime-dom, @vue/compiler-dom Lightweight; the substantive compat code lives in runtime-core.

The exact versions are visible in each package's package.json. The catalog: notation in the root references the workspace catalog for shared dep versions.

External runtime dependencies, by reason

A short tour of why each external package shows up:

  • @babel/parser — used by compiler-core to parse JavaScript expressions inside templates (v-if, :foo="…", v-on="…") and by compiler-sfc to parse <script> blocks. Vue does not bundle the full @babel/core — only the parser, which is much smaller.
  • @babel/types — type definitions for the AST shapes produced by @babel/parser. Used by compiler-sfc/src/script/resolveType.ts.
  • magic-string — incremental string editing. Used pervasively by compiler-sfc to apply many small edits to the source while preserving offsets for source maps. Without it, the SFC compiler would have to reconstruct the script from scratch on every change.
  • estree-walker — recursive AST visitor with enter/leave callbacks. Used by compiler-core and compiler-sfc for identifier walks.
  • postcss — the CSS-in-JS pipeline behind compileStyle. Plugins under packages/compiler-sfc/src/style/ are PostCSS plugins.
  • source-map-js — JavaScript-only port of source-map (the V8/mozilla one is much larger). Used by codegen.
  • entities — HTML entity table. Used by compiler-core to decode &amp; and friends, and by compiler-dom for browser-aware decoding.
  • csstype — TypeScript types for CSS properties and values. Used by runtime-dom's JSX types.

Dev dependencies

The root package.json declares 50 devDependencies. The notable ones:

  • Build pipeline: rollup, rollup-plugin-dts, rollup-plugin-esbuild, @rollup/plugin-alias, @rollup/plugin-commonjs, @rollup/plugin-json, @rollup/plugin-node-resolve, @rollup/plugin-replace, esbuild, esbuild-plugin-polyfill-node.
  • Type pipeline: typescript (~5.6.2), tslib, @types/node, @types/hash-sum, @types/serve-handler, @types/semver.
  • Test pipeline: vitest, @vitest/coverage-v8, @vitest/eslint-plugin, jsdom, puppeteer.
  • Lint and format: eslint, typescript-eslint, eslint-plugin-import-x, prettier, lint-staged, simple-git-hooks.
  • SFC playground: markdown-table, marked, serve, serve-handler, todomvc-app-css.
  • Release tooling: conventional-changelog, conventional-changelog-angular, enquirer, npm-run-all2, picocolors, pretty-bytes, rimraf, semver.

The @swc/core dev dep exists for inline-enums.js; SWC's much faster TypeScript parser drives the const-enum-rewrite step.

Why so few runtime deps?

The runtime bundle that ships to the browser pulls in only @vue/shared, @vue/reactivity, @vue/runtime-core, @vue/runtime-dom, and (transitively for some users) csstype. None of these have non-@vue runtime dependencies. The result is that the production runtime is around 35 KB minified+gzipped for the full reactivity + renderer bundle, and dropping further with tree-shaking when users only use a subset.

Tightly controlling the dependency graph is one of Vue's explicit non-functional requirements — every new dep proposal in a PR is discussed in detail.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Dependencies – Vue.js wiki | Factory