stylex icon indicating copy to clipboard operation
stylex copied to clipboard

feat: Expand configuration options to CLI

Open nmn opened this issue 1 year ago • 4 comments

Added a new styleXConfig option that can be passed to the CLI using the JSON5 file that is passed directly to the StyleX Babel plugin. There is one modification: The aliases can be relative instead of absolute paths. The CLI will auto-convert them to absolute paths.

Also, fixed a couple bugs:

  1. The CLI was not handling the useCSSLayer option correctly
  2. A few styles in open-props were incorrect

More improvements to the CLI are coming as well.

nmn avatar Jul 09 '24 12:07 nmn

compressed-size: runtime library

Size change: 0.00 kB Total size: 2.52 kB

View unchanged
Filename: gzip (minify) kB size kB change % change
./packages/stylex/lib/stylex.js 1.04 (3.22) 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 Jul 09 '24 12:07 github-actions[bot]

compressed-size: e2e bundles

Size change: 0.00 kB Total size: 1125.68 kB

View unchanged
Filename: gzip (minify) kB size kB change % change
./apps/rollup-example/.build/bundle.js 1002.49 (10185.35) 0.00 (0.00) 0.0% (0.0%)
./apps/rollup-example/.build/stylex.css 123.19 (774.43) 0.00 (0.00) 0.0% (0.0%)

github-actions[bot] avatar Jul 09 '24 12:07 github-actions[bot]

Side question: is it possible for imported node modules to be under an alias. I imagine that will break the experimental module compilation if they can

Jta26 avatar Jul 10 '24 02:07 Jta26

Side question: is it possible for imported node modules to be under an alias. I imagine that will break the experimental module compilation if they can

Any aliases will need to be manually configured, and so the cli can resolve those as well. The imported modules also have other issues, so it's a good thing they're marked as "experimental"!

nmn avatar Jul 15 '24 21:07 nmn