facebook / stylex

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

fix: mark open-props type as module for ESM compat #525

Closed nmn closed 2 months ago

nmn commented 2 months ago

Fixes #505

Marks the @stylexjs/open-props package as an ESM package.

github-actions[bot] commented 2 months 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 2 months 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%) |
eryue0220 commented 2 months ago

Sorry, I didn't notice this PR before. I committed a related pr, but the solution is different with this one. I think this will affect those non esm modules.

nmn commented 2 months ago

@eryue0220 I saw your PR as well. I've been thinking about it and I don't think the extra work you did is needed. Since open-props needs to be compiled when used, it's not necessary to make CJS packages available at all.

eryue0220 commented 2 months ago

@nmn Sorry for the late response. I thought you are right, and I've closed my pr. Thank you for your answer.