Investigate tree-shaking opportunities for carbon-components
See original GitHub issueWe use only a small set of functionality from carbon-components
in carbon-components-react
, specifically settings.prefix
, but unfortunately are unable to tree-shake unused parts of vanilla components. This issue is to investigate why and address why these modules are unable to be DCE’d.
- Additionally evaluate if there could be a carbon icons subfolder where we reexport from there so carbon icons is more tree shakable
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Tree-Shaking Problems with Component Libraries - Medium
Tree -shaking isn't magic, and much like the garbage collector, you need to understand a little of what it's doing to get the...
Read more >Svelte - Carbon component import breaks debugging
When you use: import { Tile } from 'carbon-components-svelte' ... solution that made sure the source maps work and I still get tree...
Read more >The wood from the trees: The use of timber in construction
As such, the sustainable harvest of timber from well-managed forests for use in construction presents a real opportunity to sequester more carbon than...
Read more >carbon-design-system - Bountysource
... but unfortunately are unable to tree-shake unused parts of vanilla components. This issue is to investigate why and address why these modules...
Read more >Work in progress - Carbon Design System
It's an early opportunity for you to provide feedback and have a say in Carbon's direction. Components and patterns. Tree view component ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey there @enagorny! Currently, this is tracking for our 2021 Release: https://medium.com/carbondesign/whats-coming-to-carbon-in-2021-39a4c7d1762a We don’t have an umbrella issue yet for this release but when we finalize it we’ll make sure it’s a pinned issue 👍
@jayarjo by default, this should be the case for
carbon-components-react
. Often times if you are bringing in every component, then there is an import tocarbon-components-react/lib/components/*
somewhere which is causing the bundle to load CommonJS modules.This issue originally came up when vanilla JS files from
carbon-components
were being included in the bundle because of our usage ofsettings.prefix
. Thankfully this should no longer be the case, as well, but we will still move forward with droppingcarbon-components
fromcarbon-components-react
in the future 😄Hope this helps!