Open
Conversation
🦋 Changeset detectedLatest commit: 1d7a61f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
kiner-tang
reviewed
Feb 13, 2023
packages/ossa-doc/docs/组件/icon.md
Outdated
Collaborator
There was a problem hiding this comment.
那这样我们不是要在每一个使用到icon的组件都引入一次?是不是可以增加一个plugin完成这项工作,检测到tsx中有引入icon,就自动引入呢?
Collaborator
Author
There was a problem hiding this comment.
主要是因为Icon的样式文件比较大,如果使用者没有使用到Icon,那引入Icon的样式文件会对包体积不友好,拿Button举例,如果没有使用到带Icon的Button,其实可以不引入Icon的scss文件。
感觉plugin的想法可行,检测到有带icon属性的OsXXX时,引入icon的样式文件
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这个 PR 做了什么? (简要描述所做更改)
动态引入时,间接使用
Icon的用法这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台: