Open
Description
Describe the bug
Usage:
features:
- icon: <i class="i-carbon-sun" />
title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
Check the feature icon type
type FeatureIcon =
| string
| { src: string; alt?: string; width?: string; height: string }
| {
light: string
dark: string
alt?: string
width?: string
height: string
}
I refer to the render logic, use v-html
render the icon.
Display well in dev
environment, but shows errors in prod
environment.
dev | build |
---|---|
![]() |
![]() |
Reproduction
https://stackblitz.com/github/zyyv/vitepress-unocss-issue
- Display right run
pnpm dev
- Display error run
pnpm build && pnpm preview
Expected behavior
Dev and build behave the same
System Info
latest
Additional context
No response
Validations
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.