Although there is an onlyDirection option in .postcssrc.js for us to config, it can only receive ltr or rtl string explicitly. We couldn't dynamically pass a value based on the html lang attribute. My project set the lang attribute for html tag in runtime, but this plugin set the onlyDirection option when compiling, which happens before runtime. I don't quite sure if this is the reason why it is hard to generate a RTL or a LTR version dynamically.