Closed milesj closed 3 years ago
Made some progress. Gzipped is now lower than Emotion (just barely), at 9kb.
Some packages got way smaller, some stayed the same, while others got bigger (added more features).
Unminified ESM: Core - 16,004 B -> 15,132 B SSS - 18,580 B -> 15,042 B Style - 35,506 -> 19,870 B System - 20,388 B -> 9,617 B React - 6,582 B -> 7,152 B + 5,452 B Utils - 3KB
Gonna close this.
Describe the bug
Compared to other libs (gzipped):
Aesthetic (w/ React): 11.8kb Emotion (w/ Stylis): 9.2kb Aphrodite: 6.4kb Styled components: 5.6kb Linaria (w/ ThemeProvider): 3.7kb Styled JSX: 2.8kb Linaria: 2.5kb
This will be a hard solve since Aesthetic offers more than others (like design system, vendor prefixing, RTL, themeing, etc). Some of these libraries also don't have a React implementation, since they're ran in the module scope.
However, ways to improve it:
__DEV__
checks when applicable.Sheet
classes into 1. We don't need 3.Screenshots
Environment
Platform: Web
Additional context