elchininet / postcss-rtlcss

PostCSS plugin to automatically build Cascading Style Sheets (CSS) with Left-To-Right (LTR) and Right-To-Left (RTL) rules using RTLCSS
https://elchininet.github.io/postcss-rtlcss/
Apache License 2.0
102 stars 16 forks source link

Example on how to add postcss-rtlcss to `postcss.config.js` #241

Closed 3baaady07 closed 9 months ago

3baaady07 commented 9 months ago

I'm looking to integrate this plugin using the postcss.config.js configuration file, though there's no documentation on how to go about doing that. I'm new to front-end development and I'm just starting to learn about bundlers so this type of things are not really second-nature to me.

elchininet commented 9 months ago

Hi @3baaady07,

You need to search for those examples in the build tool that you are using. As the postcss documentation states, these are the steps to use postcss:

Usage

You can start using PostCSS in just two steps:

  1. Find and add PostCSS extensions for your build tool.
  2. Select plugins and add them to your PostCSS process.

The second step depends on the build tool that you are using. There are multiple build tools that use a postcss.config.js to configure postcss but the way to do it is not the same in all of them.

Check in your build tool how to add postcss plugins to it, and then depending on the way of adding them, check how to import postcss-rtlcss with commonJS or with ES6 modules.

Or if you tell me what build tool are you using, I can guide you to the right configuration.

Regards