# mdsvex

> Markdown preprocessor for Svelte

Latest version **0.12.8** (published 2026-07-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install mdsvex
pnpm add mdsvex
yarn add mdsvex
bun add mdsvex
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.12.8 |
| Published | 2026-07-19 |
| First published | 2019-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3065 |
| Author | pngwn |
| Maintainers | evilpingwin |
| Keywords | test, preprocessor, mdx, markdown, svelte |

## Links

- npm: https://www.npmjs.com/package/mdsvex
- Repository: https://github.com/pngwn/MDsveX
- Homepage: https://github.com/pngwn/MDsveX#readme
- Issues: https://github.com/pngwn/MDsveX/issues
- npm.io page: https://npm.io/package/mdsvex

## Dependencies (6)

- [prismjs](https://npm.io/package/prismjs.md) ^1.17.1
- [@types/mdast](https://npm.io/package/@types/mdast.md) ^4.0.4
- [@types/unist](https://npm.io/package/@types/unist.md) ^2.0.3
- [prism-svelte](https://npm.io/package/prism-svelte.md) ^0.4.7
- [vfile-message](https://npm.io/package/vfile-message.md) ^2.0.4
- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^2.0.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.12.8 (latest) — 2026-07-19
- 1.0.0-next.1 (next) — 2026-10-05
- 0.8.5-beta.0 (beta) — 2020-08-19
- 1.0.0-next.0 — 2026-09-20
- 0.12.7 — 2026-03-08
- 0.12.6 — 2025-05-08
- 0.12.5 — 2025-04-22
- 0.12.4 — 2025-04-21
- 0.12.3 — 2024-08-17
- 0.12.2 — 2024-08-15
- 0.12.1 — 2024-08-15
- 0.12.0 — 2024-08-15
- 0.11.2 — 2024-06-04
- 0.11.1 — 2024-06-04
- 0.11.0 — 2023-06-24
- … 80 more at https://npm.io/package/mdsvex/versions

## README

# MDsveX

_do ya think I'm svexy?_

A markdown preprocessor for Svelte components. Basically [MDX](https://github.com/mdx-js/mdx) for Svelte.

This preprocessor allows you use Svelte components in your markdown, or markdown in your svelte components.

[Try it](https://mdsvex.com/)

You can do this:

```jsx
<script>
  import { Chart } from '../components/Chart.svelte';
</script>

# Here’s a chart

The chart is rendered inside our MDsveX document.

<Chart />
```

https://mdsvex.com/

---
_Source: https://npm.io/package/mdsvex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
