MohammadYounes / rtlcss

Framework for transforming Cascading Style Sheets (CSS) from Left-To-Right (LTR) to Right-To-Left (RTL)
https://rtlcss.com
MIT License
1.68k stars 128 forks source link

This rtlcss package how to use in Laravel vite.config.js #326

Open ravajihadiya opened 1 year ago

ravajihadiya commented 1 year ago

This rtlcss package how to use in Laravel vite.config.js, have you any suggestion ?? or demo code for that

nawafinity commented 1 year ago

Hello @ravajihadiya

Accroding to this: https://github.com/MohammadYounes/rtlcss/issues/301#issuecomment-1282953195

You can configure postcss plugins inside postcss.config.js, to do that please follow the following steps:

  1. Create postcss.config.js file in the root directory.
  2. Install postcss-rtl using npm install -D postcss-rtlcss
  3. Add the folowing lines inside postcss.config.js
import postcssRTLCSS from 'postcss-rtlcss';

export default {
    plugins: [
        postcssRTLCSS()
    ]
}
Ahmed-Elrayes commented 6 months ago

Well @ravajihadiya did great explaining, but a bit of editing do the same steps as he wrote

Hello @ravajihadiya

Accroding to this: #301 (comment)

You can configure postcss plugins inside postcss.config.js, to do that please follow the following steps:

  1. Create postcss.config.js file in the root directory.
  2. Install postcss-rtl using npm install -D postcss-rtlcss
  3. Add the folowing lines inside postcss.config.js

Then put it like that in postcss.config.js:

export default {
    plugins: {
        autoprefixer: {},
        'postcss-nested': {},
        'postcss-rtlcss': {}. // --> Add this here and it will work
    },
};