feat: Expand configuration options to CLI
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:
- The CLI was not handling the useCSSLayer option correctly
- A few styles in open-props were incorrect
More improvements to the CLI are coming as well.
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%) |
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%) |
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
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"!