Skip to content

Can I somehow reduce the Carbon bundle size? #7560

Answered by dakahn
dakahn asked this question in Help
Discussion options

You must be logged in to vote

via @joshblack 's comment here

The icons will be tree-shaken from bundles. More often than not when they aren't being removed from the bundle it is due to an import from a CommonJS entrypoint (the lib folder) or a misconfiguration by the bundler or framework.

Here's a quick example with create-react-app:

With only icons-react

With carbon-components-react and icons-react


Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dakahn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant