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

chore: Import IconContext directly #29045

Merged
merged 1 commit into from
Jan 26, 2021
Merged

chore: Import IconContext directly #29045

merged 1 commit into from
Jan 26, 2021

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Jan 26, 2021

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

resolve #29038

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Optimize ConfigProvider to avoid import all icons when tree shaking is not enabled.
🇨🇳 Chinese 优化 ConfigProvider 在未开启 tree shaking 的项目中引入所有图标的问题。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jan 26, 2021

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a85ddf7:

Sandbox Source
antd reproduction template Configuration
antd reproduction template (forked) Issue #29038

@codecov
Copy link

codecov bot commented Jan 26, 2021

Codecov Report

Merging #29045 (a85ddf7) into master (8158f45) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master    #29045   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          393       393           
  Lines         7466      7467    +1     
  Branches      2152      2152           
=========================================
+ Hits          7466      7467    +1     
Impacted Files Coverage Δ
components/config-provider/index.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8158f45...a85ddf7. Read the comment docs.

@github-actions
Copy link
Contributor

Size Change: +31 B (0%)

Total Size: 834 kB

Filename Size Change
./dist/antd-with-locales.min.js 336 kB +15 B (0%)
./dist/antd.min.js 296 kB +16 B (0%)
ℹ️ View Unchanged
Filename Size Change
./dist/antd.compact.min.css 66.9 kB 0 B
./dist/antd.dark.min.css 68.2 kB 0 B
./dist/antd.min.css 66.9 kB 0 B

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In v4.11.1 ConfigProvider import all icons dramatically increasing bundle size
2 participants