[Bug]: contrastReverse 不支持在服务端执行,ssr 报错
- Dominant language
- TypeScript
- Stars
- 12.6k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug / 问题描述
```ts
labels: [
{
text: (d) => `${d.action}\n${d.pv}`,
position: 'inside',
transform: [{ type: 'contrastReverse' }],
},
],
```
### Reproduction link / 复现链接
_No response_
### Steps to Reproduce the Bug or Issue / 重现步骤
_No response_
### Version / 版本
Please select / 请选择
### OS / 操作系统
- [x] macOS
- [x] Windows
- [x] Linux
- [x] Others / 其他
### Browser / 浏览器
- [ ] Chrome
- [ ] Edge
- [ ] Firefox
- [ ] Safari (Limited support / 有限支持)
- [ ] IE (Nonsupport / 不支持)
- [ ] Others / 其他
Contributor guide
Research direction
Locate the TypeScript implementation of the `contrastReverse` transform and the server-side rendering path, then reproduce the error with the labels configuration shown in the issue. Done means this transform no longer produces an SSR error for that configuration and its server-rendered output remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100