Skip to content

Conversation

@mellyeliu
Copy link
Member

We use mixed exports within .stylex.js files because the internal lint rule is too permissive. Mixed exports can be problematic because they pollute the "only imports from .stylex.js files" mental model. It'll also introduce complications for other features we want to build moving forward. The plan is to migrate WWW to this lint rule and turn off this config after migration.

External users should not use this config.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 27, 2025
@github-actions
Copy link

github-actions bot commented Oct 27, 2025

workflow: benchmarks/perf

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

[email protected] compare
node ./compare.js /tmp/tmp.3DmSq8YhpD /tmp/tmp.UiNvrdNlXN

Results Base Patch Ratio
babel-plugin: stylex.create
· basic create 616 610 0.99 -
· complex create 82 177 2.16 !!
babel-plugin: stylex.createTheme
· basic themes 459 433 0.94 !!
· complex themes 43 42 0.98 -

@github-actions
Copy link

github-actions bot commented Oct 27, 2025

workflow: benchmarks/size

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

[email protected] compare
node ./compare.js /tmp/tmp.Q5Y0XvbUdf /tmp/tmp.W2IKQvL0Pa

Results Base Patch Ratio
@stylexjs/stylex/lib/cjs/stylex.js
· compressed 1,282 1,282 1.00
· minified 4,025 4,025 1.00
@stylexjs/stylex/lib/cjs/inject.js
· compressed 1,223 1,223 1.00
· minified 3,216 3,216 1.00
benchmarks/size/.build/bundle.js
· compressed 496,650 496,650 1.00
· minified 4,847,840 4,847,840 1.00
benchmarks/size/.build/stylex.css
· compressed 99,853 99,853 1.00
· minified 747,541 747,541 1.00

@mellyeliu mellyeliu force-pushed the mixed-exports-enforce branch from 3ab4566 to 22513aa Compare October 28, 2025 20:04
@mellyeliu mellyeliu merged commit 08e96a9 into main Oct 28, 2025
9 checks passed
@mellyeliu mellyeliu deleted the mixed-exports-enforce branch October 28, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants