facebook / stylex

StyleX is the styling system for ambitious user interfaces.
https://stylexjs.com
MIT License
8.21k stars 304 forks source link

fix: pass caller to babel within rollup plugin #612

Closed nmn closed 5 days ago

nmn commented 5 days ago

Fixes #402

There has been reports of the Rollup Plugin not playing well with babel-env. A fix was suggested in the issue above which is what this PR implements.

Still trying to reproduce the bug, but putting up this PR in the meantime for review.

github-actions[bot] commented 5 days ago

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] commented 5 days ago

compressed-size: e2e bundles

Size change: 0.00 kB Total size: 1128.74 kB

View unchanged | Filename: gzip (minify) | kB size | kB change | % change | | :--- | :--- | :--- | :--- | | `./apps/rollup-example/.build/bundle.js` | **1005.32** (10185.35) | **0.00** (0.00) | **0.0%** (0.0%) | | `./apps/rollup-example/.build/stylex.css` | **123.42** (774.34) | **0.00** (0.00) | **0.0%** (0.0%) |
nmn commented 5 days ago

I can't reproduce the issue, but the change doesn't cause any regression either.