The Problem Developers need a fast, Markdown‑driven way to author interactive slide decks that can embed live Vue components, LaTeX, Mermaid diagrams and custom Vite plugins. Maintaining such a tool requires a tight integration between a Vite‑powered dev server, a Vue runtime, and a set of CLI utilities for building and publishing.

What This Does The repository is a portfolio of four self‑contained projects: the core Slidev packages (packages/), a set of runnable demos (demo/), Cypress end‑to‑end tests (cypress/), and assorted helper scripts (scripts/). The core lives in packages/, where packages/client/main.ts boots a Vue app that renders the slide editor and presenter UI. The demo demo/composable-vue/index.html shows how a user can import a Vue component (demo/composable-vue/components/Connections.vue) directly into a slide. Documentation is served from docs/.vitepress/theme/index.ts, which re‑exports the same client UI for the site.

How It Is Wired Execution starts at packages/client/main.ts. It creates the Vue app, registers global utilities from packages/client/composables/useNav.ts (navigation logic) and injects the resolver packages/slidev/node/resolver.ts. The resolver is the hub that maps slide‑relative imports to real files; 17 other modules depend on it, giving it the highest fan‑in. The navigation composable imports packages/client/state/index.ts, which in turn pulls packages/types/src/index.ts for type definitions, forming a circular import chain (useNav → state/index → types/index → back to useNav). The CLI entry packages/client/index.ts ultimately calls packages/slidev/node/vite/index.ts, which configures Vite with plugins from packages/slidev/node/syntax/transform/index.ts. That transformer parses the Slidev‑specific Markdown syntax and injects Vue components. The most unstable module is packages/slidev/node/syntax/transform/index.ts (instability 0.83) because it imports many helper utilities. Because of these cycles and hub modules, a change in navigation or resolver logic can ripple through many files (up to 17 dependents), raising the risk of regression.

How To Use It

# clone the repo
git clone https://github.com/moses-y/slidev
cd slidev

# install all workspace packages (pnpm is the lockfile manager)
pnpm install

# run the documentation site (Vite dev server)
pnpm dev   # defined in the root package.json scripts

The demo/composable-vue demo can be opened directly in a browser via its index.html. No additional environment variables are required; configuration lives in the various vite.config.ts files under demo/ and cypress/fixtures/basic/.

Real‑World Use A tech‑blog author can write a slide deck in slides.md (e.g., cypress/fixtures/basic/slides.md), embed a live Vue component with <Component src="./components/Counter.vue" />, run pnpm dev to preview changes instantly, then pnpm build (CLI defined in packages/client/index.ts) to export a PDF or PPTX for distribution. The same workflow integrates with the VSCode extension (assets/logo-for-vscode.png) for in‑IDE editing.

Code Health & Issues

  • High – Import cycles (24 modules). Example: packages/client/composables/useNav.ts, packages/vscode/src/projects.ts, packages/client/state/index.ts. Break cycles by extracting shared types or deferring imports.
  • Medium – High branching density in packages/slidev/node/resolver.ts, packages/slidev/node/syntax/transform/utils.ts, packages/vscode/src/composables/useFocusedSlide.ts. Refactor into strategy objects or tables.
  • Medium – Hub modules (resolver.ts, useNav.ts, env.ts) have large fan‑in; keep them stable and small.
  • High – Repeated 6‑line code blocks across demo and docs components. Consolidate into shared helpers.
  • Medium – Oversized files: packages/client/.generated/unocss-tokens.ts and packages/slidev/node/cli.ts. Split by responsibility.
  • Low – Three TODO/FIXME markers in packages/vscode/src/views/slidesTree.ts. Create issues or resolve them.

Health audit findings (static analysis):

  • High – GitHub Actions pinned to tags only; replace with commit SHAs.
  • Medium – GITHUB_TOKEN permissions not declared; add permissions: { contents: read }.
  • Medium – No Dependabot/Renovate; add .github/dependabot.yml.
  • Medium – No dependency‑vulnerability scan in CI; add dependency-review-action or osv-scanner.
  • Medium – Checkout step keeps credentials; set persist-credentials: false.
  • Medium – Test coverage low (9 test files vs 352 source files); add tests for high‑fan‑in modules.
  • Low – Job timeouts missing; set timeout-minutes.
  • Low – Missing editor/formatter conventions; add .editorconfig, .gitattributes, formatter config.

The Bottom Line Slidev provides a well‑structured, Vite‑powered slide authoring stack with rich Vue integration, but its core suffers from import cycles and several high‑impact hub modules that increase change risk. The repo is healthy in terms of CI and licensing, yet it needs tighter CI security, broader test coverage, and refactoring of duplicated or oversized code before being used as a production‑grade foundation. Engineers comfortable with Vue, Vite, and TypeScript will find it a solid starting point, provided they address the highlighted cycles and health gaps.