Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use postcss to extract styles in Expo example #239

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Use postcss to extract styles in Expo example #239

merged 1 commit into from
Nov 14, 2024

Conversation

necolas
Copy link
Contributor

@necolas necolas commented Nov 14, 2024

Extract styles to static CSS using postcss, as there is no existing Metro integration.

Fix #34
Ref #236

Copy link

github-actions bot commented Nov 14, 2024

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.

Results Base Patch Ratio
react-strict-dom/dist/dom/index.js
· compressed 2,495 2,515 1.01 +
· minified 8,686 8,688 1.00 +
react-strict-dom/dist/dom/runtime.js
· compressed 855 855 1.00
· minified 2,433 2,435 1.00 +
react-strict-dom/dist/native/index.js
· compressed 15,824 15,824 1.00
· minified 59,086 59,086 1.00

Copy link

github-actions bot commented Nov 14, 2024

workflow: benchmarks/perf (native)

Comparison of performance test results, measured in operations per second. Larger is better.

Results Base Patch Ratio
css.create
· small 1,154,662 1,167,428 1.01 +
· small with units 452,014 454,353 1.01 +
· small with variables 684,356 691,427 1.01 +
· several small 328,871 326,277 0.99 -
· large 213,974 213,474 1.00 -
· large with polyfills 149,248 150,159 1.01 +
· complex 101,737 102,335 1.01 +
· unsupported 224,149 221,856 0.99 -
css.createTheme
· simple theme 223,441 225,295 1.01 +
· polyfill theme 210,222 210,494 1.00 +
css.props
· small 246,739 246,158 1.00 -
· small with units 193,540 193,032 1.00 -
· small with variables 106,469 105,751 0.99 -
· small with variables of units 74,921 75,236 1.00 +
· large 104,618 104,339 1.00 -
· large with polyfills 37,447 37,752 1.01 +
· complex 24,099 24,291 1.01 +
· unsupported 153,062 148,315 0.97 -
· simple merge 164,192 164,064 1.00 -
· wide merge 18,323 18,301 1.00 -
· deep merge 17,953 18,005 1.00 +
· themed merge 32,912 32,985 1.00 +

@necolas necolas force-pushed the expo-stylex branch 3 times, most recently from 555c283 to bd385f0 Compare November 14, 2024 20:20
Extract styles to static CSS using postcss, as there is no existing
Metro integration.

Fix #34
Ref #236

Co-authored-by: Tsubasa Sakai <javascripter@tsukkun.net>
@necolas
Copy link
Contributor Author

necolas commented Nov 14, 2024

Thanks @javascripter for the quick patches! LGTM now. Let me know what you think

@javascripter
Copy link
Contributor

@necolas Thanks for testing out. Looks good to me as well!

@necolas necolas merged commit 959722b into main Nov 14, 2024
7 checks passed
@necolas necolas deleted the expo-stylex branch November 28, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to extract StyleX CSS for Expo web?
3 participants