-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CSS] CSS 样式在发布后丢失 #3385
Comments
👋 @laolarou726,感谢给 TDesign 提出了 issue。 |
经过检查发现主要是 Menu 控件的样式丢失了,其他控件的样式看起来都是正常的。 |
手动将 |
tdesign-react/es/style/index.css 这里面是css variables和少量的公共样式 丢失应该全部组件都异常 但是描述看起来是只有一个menu异常 是menu的所有样式都异常还是部分样式? |
看起来是menu的整个样式都丢失了,但其他组件的样式都能够正常加载 |
tdesign-react 版本
v1.11.0
重现链接
No response
重现步骤
在
main.tsx
添加import "tdesign-react/es/style/index.css";
在 Dev 模式下样式显示均正常,使用
vite build
构建后发现大部分控件样式丢失。如果使用
import "tdesign-react/dist/tdesign.css";
能够正常发布且样式正常,但打包的 CSS 体积非常大。vite.config.ts
期望结果
根据官方文档
import "tdesign-react/es/style/index.css";
应该能够正常使用实际结果
No response
框架版本
React 18.2.0
浏览器版本
133.0.3065.82
系统版本
Windows 11 24H2
Node版本
v22.14.0
补充说明
No response
The text was updated successfully, but these errors were encountered: