CodeVetter · Repo Unpack · Feature catalog
vuejs/core
There are no routes or screens in the product sense — the user-facing surface is (a) the public JS API exported from `@vue/runtime-core`/`@vue/runtime-dom`, (b) the compiler APIs consumed by vite-plugin-vue/vue-loader, (c) SSR render functions, (d) the `nr <script>` developer command surface in package.json, and (e) two deployed browser tools. Built-in components (Teleport, Suspense, KeepAlive, BaseTransition, Transition, TransitionGroup) and built-in directives (v-model, v-show, v-on modifiers) are shipped as first-class features handled specially in both the compiler and the renderer. Custom elements and lazy-hydration strategies are the newer feature surfaces.
- `packages/runtime-core/src/index.ts` is the canonical public API list: reactivity re-exports, `computed`, the `watch` family, all `on*` lifecycle hooks, `provide`/`inject`/`hasInjectionContext`, `nextTick`, `defineComponent`, `defineAsyncComponent`, `useAttrs`/`useSlots`/`useModel`/`useTemplateRef`/`useId`, `h`, `createVNode`, and the four built-in components.
- `createApp` and `createSSRApp` are distinct DOM entrypoints: the first calls `ensureRenderer()`, the second `ensureHydrationRenderer()` which swaps in a hydration-enabled renderer and flips a module-level `enabledHydration` latch, so the hydration code path is only pulled into the bundle when SSR apps are used.
- The App instance exposes `use`, `mixin`, `component`, `directive`, `mount`, `unmount`, `onUnmount`, `provide` and `runWithContext`, with plugin dedup via an `installedPlugins` WeakSet and app-level teardown callbacks collected in `pluginCleanupFns`.
- Lazy hydration is a shipped feature with four strategy factories — `hydrateOnIdle`, `hydrateOnVisible`, `hydrateOnMediaQuery`, `hydrateOnInteraction` — exported from runtime-core and exercised by dedicated HTML fixtures in the e2e suite.
- Web-component support is a full subsystem: `defineCustomElement`/`defineSSRCustomElement` plus a `VueElement` class with shadow-DOM style injection (`_injectChildStyle`) and the `useHost`/`useShadowRoot` composables that warn when called outside a custom-element-defined component.
- `@vue/compiler-sfc` is the public SFC toolchain: `parse`, `compileTemplate`, `compileStyle`/`compileStyleAsync`, `compileScript`, `rewriteDefault`/`rewriteDefaultAST`, plus type-resolution internals `resolveTypeElements`, `inferRuntimeType`, `invalidateTypeCache` and `registerTS` explicitly exported for build-tool integration.
- `<script setup>` macros supported by compileScript are enumerated in a `MACROS` constant — defineProps, defineEmits, defineExpose, defineOptions, defineSlots, defineModel and withDefaults — each with its own module under `packages/compiler-sfc/src/script/`.
- Style compilation supports scoped CSS, CSS modules and preprocessors: `compileStyle` builds a postcss pipeline from `pluginTrim` and `pluginScoped`, adds `postcss-modules` when `modules: true`, and `style/preprocessors.ts` lazily `require`s sass/less/stylus through an injectable `preprocessCustomRequire`.
- SSR exposes five output shapes from `@vue/server-renderer`: `renderToString`, `renderToSimpleStream`, `renderToNodeStream`, `pipeToNodeWritable`, `renderToWebStream` and `pipeToWebWritable` (plus deprecated `renderToStream`), with `initDirectivesForSSR()` run as an import side effect.
- The developer command surface in package.json includes `nr dev`, `nr build`, `nr build-dts`, `nr check`, `nr test`/`test-unit`/`test-e2e`/`test-dts`/`test-coverage`, `nr size` (with size-global/size-esm/size-esm-runtime sub-targets), `nr bench`/`bench-compare`, `nr dev-sfc`, `nr dev-compiler` and `nr release`.
- The SFC Playground (`packages-private/sfc-playground`) wraps `@vue/repl` with a Monaco editor, toggles for production mode / SSR mode / auto-save, a TypeScript version pin (`DEFAULT_TYPESCRIPT_VERSION = '6.0.3'`), and enables experimental `propsDestructure: true` by default.
- The Template Explorer (`packages-private/template-explorer`) renders compiler output side-by-side in Monaco, can switch between `@vue/compiler-dom` and `@vue/compiler-ssr` via an `ssrMode` toggle, and maps generated code back to source using `SourceMapConsumer` from source-map-js.
- `@vue/compat` is a shipped Vue-2 compatibility build: it builds seven formats, creates `Vue` via `createCompatVue()` with `Vue.compile` attached, and drives per-feature deprecation warnings from the `DeprecationTypes` enum and `deprecationData` table in runtime-core's compat layer.