Currently, Sula + AntD + dependencies (lodash, moment, axios etc.) are coming up to 1.4MB bundle size in production mode. This is large and preferable to reduce it as much as possible.
Solution
There seems to be individual UI components such as rc-menu (35KB), rc-select (34KB), rc-field-form (31KB) etc. that are being used in addition to AntD. Not sure if this duplication is required. It would be great if all these rc-* components could be replaced with just AntD components, since AntD is anyway being used for the rest. Also, just 35KB for menu (rc-menu), or 34KB for select (rc-select) etc. sounds lot of wasteful size.
Not sure if axios (12.47Kb) is a required dependency for sula core functionality? Can it be made a peer-dependency (optional by the user)?
moment (57.62KB) probably need to be replaced with day.js
lodash (26.39KB) not sure how to reduce it - probably most of these used methods are already supported by ES6 natively? For example, assign, isArray etc. are natively supported by JS and utilizing them will reduce the additional dependency.
Description
Currently, Sula + AntD + dependencies (lodash, moment, axios etc.) are coming up to 1.4MB bundle size in production mode. This is large and preferable to reduce it as much as possible.
Solution
rc-menu
(35KB),rc-select
(34KB),rc-field-form
(31KB) etc. that are being used in addition to AntD. Not sure if this duplication is required. It would be great if all theserc-*
components could be replaced with just AntD components, since AntD is anyway being used for the rest. Also, just 35KB for menu (rc-menu), or 34KB for select (rc-select) etc. sounds lot of wasteful size.axios
(12.47Kb) is a required dependency for sula core functionality? Can it be made a peer-dependency (optional by the user)?moment
(57.62KB) probably need to be replaced withday.js
lodash
(26.39KB) not sure how to reduce it - probably most of these used methods are already supported by ES6 natively? For example,assign
,isArray
etc. are natively supported by JS and utilizing them will reduce the additional dependency.