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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Spread Privacy
Spread Privacy
T
Troy Hunt's Blog
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
Schneier on Security
罗磊的独立博客
T
The Exploit Database - CXSecurity.com
博客园 - 司徒正美
月光博客
月光博客
C
Cybersecurity and Infrastructure Security Agency CISA
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Project Zero
Project Zero
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Latest news
Latest news
L
Lohrmann on Cybersecurity
阮一峰的网络日志
阮一峰的网络日志
C
CERT Recently Published Vulnerability Notes
腾讯CDC
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
T
Threat Research - Cisco Blogs
T
Tenable Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - Franky
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
Attack and Defense Labs
Attack and Defense Labs
C
Cyber Attacks, Cyber Crime and Cyber Security
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
Scott Helme
Scott Helme
小众软件
小众软件
L
LINUX DO - 最新话题
博客园 - 叶小钗
博客园 - 【当耐特】
PCI Perspectives
PCI Perspectives
SecWiki News
SecWiki News
S
Security Affairs
P
Palo Alto Networks Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 聂微东
量子位
C
CXSECURITY Database RSS Feed - CXSecurity.com
Help Net Security
Help Net Security
S
Secure Thoughts
S
Securelist

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.