Uni App Markdown renderer quick start
@fluxdown/uni-app provides Markdown components for Uni App x Vapor projects. Fluxdown Core handles parsing, syntax repair, and smooth output; .uvue components provide the interface.
Prepare the project
Create a Uni App x project with HBuilderX 5.33 or later and enable Vapor in manifest.json:
App uses Vapor rendering. Web uses the official Uni App x Vue rendering path. See AppVapor for runtime and platform requirements.
When using pnpm on Linux, add this to pnpm-workspace.yaml before installing so the Uni App compiler's GNU native dependency is installed:
Install the component and build dependencies in your project:
Build configuration
Add vite.config.js at the project root. commonjs handles CommonJS parser dependencies in App builds, while H5 uses the Uni App compiler's existing transform; the Unicode regex transform makes those dependencies work with the App JavaScript engine.
inlineDynamicImports bundles lazy modules into one file for App builds, with the incompatible manualChunks option disabled. If you already have a configuration, merge these steps into its plugins array.
@dcloudio/vite-plugin-uniis supplied by the Uni App toolchain. Its version must match the project's Uni App compiler.
Display Markdown
Styles compile with the .uvue components. Use theme to adjust colors, typography, and spacing; see the styling guide.
Receive streaming content
Pass all text received so far as text. Enable streaming during generation, then set it to false when the request finishes, is cancelled, or fails:
streaming enables trailing syntax repair, smooth output, and the scale effect. Use { smooth: false, effect: 'chunk' } to preserve network chunk boundaries. See streaming content for more examples.
Choose a component
See the plugin matrix for the complete list and configuration for every prop.
Use the side-by-side demo to compare static and streaming output across renderers, or choose Uni App in the Playground to try your own content.