惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
有赞技术团队
有赞技术团队
J
Java Code Geeks
小众软件
小众软件
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
U
Unit 42
大猫的无限游戏
大猫的无限游戏
G
Google Developers Blog
I
InfoQ
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
IT之家
IT之家
博客园 - Franky
腾讯CDC
罗磊的独立博客
雷峰网
雷峰网
M
MIT News - Artificial intelligence
博客园 - 司徒正美
A
About on SuperTechFans
SecWiki News
SecWiki News
Project Zero
Project Zero
T
Tenable Blog
The Last Watchdog
The Last Watchdog
Security Latest
Security Latest
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security
PCI Perspectives
PCI Perspectives
博客园 - 【当耐特】
C
Check Point Blog
F
Full Disclosure
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
Google Online Security Blog
Google Online Security Blog
T
Tor Project blog
T
Threat Research - Cisco Blogs
AI
AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Application and Cybersecurity Blog
Application and Cybersecurity Blog
美团技术团队
Spread Privacy
Spread Privacy

Streamdown Documentation

Configuration Getting Started Introduction Security Animation Carets Code Blocks Components GitHub Flavored Markdown Interactivity Internationalization Link Safety Memoization Migrate from react-markdown Styling Unterminated Block Parsing Typography Usage @streamdown/cjk @streamdown/code Built-in Plugins @streamdown/math @streamdown/mermaid Custom renderers
FAQ
Vercel · 2026-06-02 · via Streamdown Documentation

Common questions about Streamdown and how it works with AI-powered streaming applications.

Answers to frequently asked questions about using Streamdown in your projects.

Streamdown is specifically designed for AI-powered streaming applications. It integrates with the remend preprocessor to handle incomplete markdown syntax, which means it can render markdown gracefully even while it's being generated by AI models. It also includes security features like URL prefix restrictions and better performance optimizations for streaming contexts.

Yes! Streamdown fully supports custom components through the components prop, just like react-markdown. You can override any markdown element with your own React components to customize the rendering.

When parseIncompleteMarkdown is enabled (default), Streamdown uses the remend package to preprocess the markdown before rendering. Remend automatically detects and completes common issues in incomplete markdown like unclosed bold/italic markers, incomplete links, and partial code blocks. This preprocessing ensures smooth rendering even as markdown is being streamed from AI models. You can also use remend as a standalone package in your own projects.

Streamdown supports both remark and rehype plugins, making it compatible with most react-markdown plugins. It includes remarkGfm by default, and supports additional plugins like @streamdown/math and @streamdown/mermaid through the plugins prop. You can also add custom remark and rehype plugins through the remarkPlugins and rehypePlugins props.

This warning occurs when Next.js tries to treat Shiki as an external package. To fix this, you need to install Shiki explicitly with npm install shiki and add it to your transpilePackages array in your next.config.ts:

{
  // ... other config
  transpilePackages: ["shiki"],
}

This ensures Shiki is properly bundled with your application.

When using Streamdown with Vite and server-side rendering, you might encounter a TypeError [ERR_UNKNOWN_FILE_EXTENSION] error for CSS files (like katex.min.css). To fix this, add Streamdown to your vite.config.ts:

export default {
  // ... other config
  ssr: {
    noExternal: ['streamdown'],
  },
}

This prevents Vite from treating Streamdown as an external module during SSR, ensuring CSS files are properly processed.

Tailwind v4

Add a @source directive to your globals.css file with the path to Streamdown's distribution files:

@source "../node_modules/streamdown/dist/*.js";

If you install optional plugins, add their matching @source lines only for packages you've installed. See the plugin pages for exact paths and examples:

Example: to include the code plugin, add this to globals.css (adjust the relative path as needed):

@source "../node_modules/@streamdown/code/dist/*.js";

Tailwind v3

Add Streamdown to your content array in tailwind.config.js:

content: [
  // ... your other content paths
  "./node_modules/streamdown/dist/*.js",
]

Adjust the paths based on your project structure. This ensures Tailwind scans Streamdown's files for any utility classes used in the component.

If you run into bundling errors related to vscode-jsonrpc, langium, or other Node.js-only packages when using Streamdown with Next.js/Turbopack, this is due to Mermaid's dependency tree including server-side packages. To fix this, configure Next.js to exclude these packages from client-side bundling:

export default {
  serverComponentsExternalPackages: ['langium', '@mermaid-js/parser'],

  webpack: (config, { isServer }) => {
    if (!isServer) {
      config.resolve.alias = {
        ...config.resolve.alias,
        'vscode-jsonrpc': false,
        'langium': false,
      };
    }
    return config;
  },
};

This tells Next.js not to bundle these Node.js-only dependencies for the browser. This is an upstream issue being tracked in the Mermaid repository.