-
Notifications
You must be signed in to change notification settings - Fork 28
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
Tree shaking is not possible #64
Comments
+1 on this, this is preventing me from deploying an embedded studio to an edge runtime (Cloudflare Workers) as the icon sets each take up multiple MBs. |
@travismfrank here is my fork to use while this is not fixed : "sanity-plugin-icon-picker": "npm:[email protected]", |
I’m facing a similar issue. The plugin makes my Studio bundle size almost 5 MB. I’m only using a handful of FA icons. I hate |
@guillermo-avalos , on your package.json - "sanity-plugin-icon-picker": "3.3.0",
+ "sanity-plugin-icon-picker": "npm:[email protected]",
|
Tree-shaking is not possible due to the fact that react-icons libraries are hardcoded on the plugin and activated by a string.
It would be a breaking change, but I think the way icons are enabled should be refactored:
Current implementation ( bundle will include all the other libraries even if not used) :
Tree-shaking friendly ( bundle will only contain fa )
The text was updated successfully, but these errors were encountered: