react-strict-dom icon indicating copy to clipboard operation
react-strict-dom copied to clipboard

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

Open javascripter opened this issue 6 months ago • 0 comments

TODO

  • [ ] Wait for https://github.com/facebook/stylex/pull/1063 and https://github.com/facebook/stylex/pull/1065 to be published on npm and update @stylexjs/ package dependencies
  • [ ] Test changes in the examples app

Why

https://github.com/facebook/react-strict-dom/issues/281#issuecomment-2712591645

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

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

javascripter avatar May 17 '25 08:05 javascripter