suankularb-wittayalai-school / sk-components

A design system for all Suankularb applications
https://sk-components-demo.mysk.school
0 stars 1 forks source link

[3.0.2] Bundle Size Reduction #105

Closed smartwhatt closed 1 year ago

smartwhatt commented 1 year ago

Fixes

SiravitPhokeed commented 1 year ago

Can you explain what exactly was changed? It just looks like you removed stuff, but I know this had a positive effect, so explain yourself…?

smartwhatt commented 1 year ago

Can you explain what exactly was changed? It just looks like you removed stuff, but I know this had a positive effect, so explain yourself…?

I just changed how the React package is built by modifying the tsup.config.ts file to include all files instead of just src/index.ts then code split, eliminate dead code, etc. The result is a small bundle size using a small number of components but when the number rises the code split size increase causing some form of exponential growth.