stylex icon indicating copy to clipboard operation
stylex copied to clipboard

Fix: Validate options passed into the Babel plugin

Open nmn opened this issue 2 years ago • 2 comments

What changed / motivation ?

Improve the Babel plugin's StateManager to not use $FlowFixMe (any) and instead of validate the options passed in.

The code is very imperative at the moment and feels a bit hard to read and fragile. I'm looking into using a library like zod to clean this up.

nmn avatar Jan 03 '24 04:01 nmn

compressed-size: runtime library

Size change: 0.00 kB Total size: 2.43 kB

View unchanged
Filename: gzip (minify) kB size kB change % change
./packages/stylex/lib/stylex.js 0.95 (3.31) 0.00 (0.00) 0.0% (0.0%)
./packages/stylex/lib/StyleXSheet.js 1.48 (3.75) 0.00 (0.00) 0.0% (0.0%)

github-actions[bot] avatar Jan 03 '24 04:01 github-actions[bot]

compressed-size: e2e bundles

Size change: 0.00 kB Total size: 1128.38 kB

View unchanged
Filename: gzip (minify) kB size kB change % change
./apps/rollup-example/.build/bundle.js 1005.18 (10185.36) 0.00 (0.00) 0.0% (0.0%)
./apps/rollup-example/.build/stylex.css 123.20 (772.94) 0.00 (0.00) 0.0% (0.0%)

github-actions[bot] avatar Jan 03 '24 04:01 github-actions[bot]