Icons in @ckeditor/ckeditor5-core should be tree-shake-able #17635
Labels
domain:integration-dx
This issue reports a problem with the developer experience when integrating CKEditor into a system.
package:core
type:bug
This issue reports a buggy (incorrect) behavior.
✔️ Expected result
When building/bundling CKEditor, only the icons that are needed end up in the bundle
❌ Actual result
All icons end up in the bundle
❓ Possible solution
Because the icons are exported as properties of a single object rather than as individual symbols, they are not tree-shake-able, and anytime any icon is used by any plugin, all the icons are included in the bundle.
📃 Other details
With CKEditor 44, I'm seeing those icons take up ~31k in my bundle, which is up from ~15k in CKEditor 38. So this isn't a massive bundle size impact, but it's still significant, and especially as CKEditor is likely to continue adding features and therefore icons, it will probably continue to grow. Exporting the icons as individual symbols would allow them to be tree-shaken, and make this a non-issue.
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: