Skip to content

Transpilation StyleX code with @stylexjs/postcss-plugin #842

Answered by javascripter
Dwlad90 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this is the expected behavior. To avoid having to integrate deeply with each bundler:

  1. Source code is transpiled by StyleX Babel Plugin using normal babel.config.js (without actually collecting metadata)
  2. PostCSS is used to extract CSS as a separate step using StyleX Babel Plugin (compiling source code again and collecting metadata).

Step 1 and 2 do not share data, resulting in double compilation.

The overview of the plugin's approach is described here:
facebook/react-strict-dom#236 (comment)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Dwlad90
Comment options

Answer selected by Dwlad90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants