postcss-rtlcss-test
|
|__scss
| |__carousel.scss
|
|__index.html
(imports index.js
)
|__index.js
(imports carousel.scss
)
npm i
to install dependencies (postcss
,postcss-rtlcss
,rtlcss
,sass
,vite
).npm run compile:sass
to generate a css file (assets/css/carousel.css
) with a map.npm run rtlcss
to generate its correspondingrtl
css file (assets/css/carousel.rtl.css
)npm run build
to build thevite
project and generate a dist folder and files (dist/assets/index-[hash].css
)
The main file to pay attention to is assets/css/carousel.rtl.css
. This contains the RTL version of scss/carousel.scss
. Note the fliped selectors.
Note the file dist/assets/index-[hash].css
that is generated at build step 4 above. This file is the intended css file to be served in production. Even with configurations added to postcss.config.js
, the selectors are not fliped.