Skip to content

Comments

Add react-strict-dom/postcss-plugin based on @stylexjs/postcss-plugin#308

Merged
necolas merged 2 commits intofacebook:mainfrom
javascripter:postcss-plugin-stylex
Jul 3, 2025
Merged

Add react-strict-dom/postcss-plugin based on @stylexjs/postcss-plugin#308
necolas merged 2 commits intofacebook:mainfrom
javascripter:postcss-plugin-stylex

Conversation

@javascripter
Copy link
Contributor

@javascripter javascripter commented May 17, 2025

Why

#281 (comment)

This PR upstreams postcss-react-strict-dom to the official repo to make it easier for maintainers to make changes.

I added RSD compatibility to @stylexjs/postcss-plugin in this PR, so this adds react-strict-dom/postcss-plugin that re-exports the StyleX PostCSS Plugin with the required configuration for RSD consumers.

How

  • Added PostCSS Plugin to packages/react-strict-dom/postcss/plugin.js
  • Export the plugin as react-strict-dom/postcss-plugin in package.json
  • Updated apps/examples to use the official plugin and removed postcss-react-strict-dom dependency
  • Updated docs to use the official plugin
  • Updated StyleX to 0.14

Test Plan

  • Run cd apps/example && npm run dev:web both from the original repo and this branch and compare side-by-side to make sure output matches

Left is this branch, right is original
Screenshot 2025-05-20 at 15 12 39

@javascripter javascripter force-pushed the postcss-plugin-stylex branch from c15ca25 to b455d43 Compare May 20, 2025 06:11
@necolas
Copy link
Contributor

necolas commented May 21, 2025

#311 updates StyleX to 0.13

@javascripter
Copy link
Contributor Author

javascripter commented May 29, 2025

Rebased from main and updated to use useCSSLayers: true. Waiting for facebook/stylex#1071 to land so CSS layer warnings will disappear

@necolas
Copy link
Contributor

necolas commented May 30, 2025

This PR aims to avoid the Expo warnings facebook/stylex#1087

@necolas
Copy link
Contributor

necolas commented Jul 2, 2025

We should be able to proceed with this change now that the StyleX upgrade is done

@javascripter javascripter force-pushed the postcss-plugin-stylex branch from f68164a to d594216 Compare July 3, 2025 04:20
@javascripter javascripter marked this pull request as ready for review July 3, 2025 04:20
@javascripter
Copy link
Contributor Author

@necolas
Rebased and updated StyleX to 0.14.0 and warnings disappeared.
This is now ready for review.

@javascripter javascripter requested a review from necolas July 3, 2025 13:33
@necolas necolas force-pushed the postcss-plugin-stylex branch from d594216 to a16d890 Compare July 3, 2025 18:14
@necolas necolas force-pushed the postcss-plugin-stylex branch from a16d890 to f8e7aca Compare July 3, 2025 18:18
Copy link
Contributor

@necolas necolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience and another great PR

@necolas necolas merged commit d048144 into facebook:main Jul 3, 2025
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants