Skip to content
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

[FR]: 打包导致整个图标字体文件被引入 #3233

Open
xiaodao868 opened this issue Dec 10, 2024 · 3 comments
Open

[FR]: 打包导致整个图标字体文件被引入 #3233

xiaodao868 opened this issue Dec 10, 2024 · 3 comments
Labels
Feature Request 新功能请求

Comments

@xiaodao868
Copy link

NutUI 包名

@nutui/nutui-taro

这个功能解决了什么问题?

我并没有使用nutui中的图标组件,但是我打包的时候发现整个图标文件被打包到了主css文件中。
image
导致整个项目多了上百kb用不到的垃圾样式。
发现可能是用了某些nutui的组件导致的,比如一个button组件 这个组件引入了这些字体包。但是我实际上并没有用到button中的图标。

你期望的组件设计是怎样的?

如何优化可以剔除这些垃圾样式?

@xiaodao868 xiaodao868 added the Feature Request 新功能请求 label Dec 10, 2024
@xiaodao868
Copy link
Author

基本上common.wxss文件中 百分之80左右都是被base64的字体,上百kb。

@xiaodao868
Copy link
Author

我根本用不到任何一个图标

@xiaodao868
Copy link
Author

这个是我配置有问题么?还是什么原因导致?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request 新功能请求
Projects
None yet
Development

No branches or pull requests

1 participant