Question about stylex-swc-plugin's relationship with the official StyleX compiler #422
-
|
I'm considering using stylex-swc-plugin and have a quick question about how it works under the hood. Does the plugin rewrite the StyleX compiler logic in Rust, or does it wrap and utilize the official JavaScript StyleX compiler? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hן @husseinraoouf , thank you for your interest in the plugin. This plugin is an implementation of the official plugin written entirely in To switch from the official plugin, you just need to change the compiler to |
Beta Was this translation helpful? Give feedback.
Hן @husseinraoouf , thank you for your interest in the plugin.
This plugin is an implementation of the official plugin written entirely in
RustusingSWCforASTtranspilation. This two plugins don't have a common code base.To switch from the official plugin, you just need to change the compiler to
@stylexswc/${name-of-plugin}, since the API of this transformer is fully compatible with the official one. I will be glad to answer in more detail if you have any more questions.