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

Suppress the tree-shaking warning on development builds #29378

Closed
1 task done
cuibonobo opened this issue Feb 19, 2021 · 1 comment
Closed
1 task done

Suppress the tree-shaking warning on development builds #29378

cuibonobo opened this issue Feb 19, 2021 · 1 comment

Comments

@cuibonobo
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

This pertains to developer experience. Often the development tools with live-reloading do not enable tree-shaking so that rebuilds can happen quickly, but it is not useful to see the You are using a whole package of antd, please use... warning in the console with every rebuild. It would be better to only show this warning on production builds (i.e. where process.env.NODE_ENV === 'production').

What does the proposed API look like?

This would not be an API change. It would only affect when the tree-shaking warning is displayed in the console.

@afc163
Copy link
Member

afc163 commented Feb 20, 2021

Fixed in ant-design/antd-tools#230, next version will carry this fix.

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

No branches or pull requests

2 participants