2. Wrap initialization of 'heavy' constants into "TREE_SHAKEABLE_INIT"
Notes: 1. It is only for those constants which are initialized during module load, use next example as a reference: uui/i18n.ts
If such constant contains side-effect during initialization, then DO NOT wrap it into TREE_SHAKEABLE_INIT. Otherwise it might cause weird issues in the apps which use UUI library. Instead, try to get rid of side effect upon initialization if possible.
The"@epam/uui-core" and "@epam/uui-components" modules must not have side effects at all, because they are marked as side effect free in their package.json files ("sideEffect": false)
[ ] epam-promo/i18n.ts
[ ] uui-core/src/i18n.ts
[ ] loveship/i18n.ts
[ ] uui-components/src/i18n.tsx
[ ] uui-editor/src/serialization.ts
[ ] uui-editor/src/defaultPlugins.ts
[ ] uui-editor/src/SlateEditor.tsx
3. Replace CommonJs 3rd party libs by ESM version (if possible)
Now
Certain parts of UUI codebase cannot be removed by minifiers even if unused
To Do
1. Convert class-based React components with static props to functional React components
high priority, because it is big
)2. Wrap initialization of 'heavy' constants into "TREE_SHAKEABLE_INIT"
3. Replace CommonJs 3rd party libs by ESM version (if possible)