Replies: 1 comment
-
It's likely due to the icons package more so than the modal. Try remove any ref to icons and see if your bundle size reduced. If that works, I'd fix all your icon import to be path-specific so that the tree shaker know which icon to specifically bundle. Another way to solve this is to submit a PR to ant-design/icons and urge them to fix their package.json to follow the ESM module "specs" (it's not really a specs per-se, but it's how nodejs resolves ESM module to tree-shake). Basically it needs an exports that tells the module resolver where each files/import are. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
Hi
i use plasmo to dev my plugin happy, but when i build my plugin, i found that my build bundle size large
i install antd, and use Modal component, the build bundle size 2.3M
Is there any way to optimize
this is all i import
Thanks
Version
Latest
What OS are you seeing the problem on?
MacOSX
What browsers are you seeing the problem on?
No response
Relevant log output
No response
(OPTIONAL) Contribution
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions