修复 react-icons 5.7.0 中 SiSlack 被移除导致的编译错误

- render.jsx: 用内联 SVG 替代已移除的 SiSlack 图标
- vite.config.js: 移除 force: true 并添加 date-fns/locale 预构建,修复 semi-ui locale 模块优化崩溃
- package.json: 添加 antd 为直接依赖(@lobehub/ui 的必要 peer 依赖)
This commit is contained in:
wangxiaoji 2026-07-02 14:41:00 +08:00
parent c8d76437cb
commit 6836012ab4
3 changed files with 8 additions and 2 deletions

1
web/package.json vendored
View File

@ -11,6 +11,7 @@
"@visactor/react-vchart": "~1.8.8",
"@visactor/vchart": "~1.8.8",
"@visactor/vchart-semi-theme": "~1.8.8",
"antd": "^5.29.3",
"axios": "1.13.5",
"clsx": "^2.1.1",
"dayjs": "^1.11.11",

View File

@ -111,13 +111,18 @@ import {
SiOkta,
SiOpenid,
SiReddit,
SiSlack,
SiTelegram,
SiTwitch,
SiWechat,
SiX,
} from 'react-icons/si';
const SiSlack = (props) => (
<svg stroke="currentColor" fill="currentColor" strokeWidth="0" viewBox="0 0 24 24" height="1em" width="1em" {...props}>
<path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.528 2.528 0 0 1-2.521-2.521V2.522A2.528 2.528 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.528 2.528 0 0 1-2.521-2.522v-2.522h2.521zM15.165 17.688a2.527 2.527 0 0 1-2.521-2.523 2.527 2.527 0 0 1 2.521-2.521h6.313A2.528 2.528 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z" />
</svg>
);
// Lucide
export function getLucideIcon(key, selected = false) {
const size = 16;

2
web/vite.config.js vendored
View File

@ -30,7 +30,7 @@ export default defineConfig({
}),
],
optimizeDeps: {
force: true,
include: ['date-fns/locale'],
esbuildOptions: {
loader: {
'.js': 'jsx',