Fork of the css loader, improved for rtl.
Drop-in replacement of the css-loader, it simply checks the dir
attribute on the html
tag on the page, then injects either the regular css or the rtl'ized css.
Uses rtlcss under the hood.
Warning This module should only be used for development. The processing of your css being done server-side, the bundle will include both the regular css and the rtl version, which can make your bundle a lot bigger. If you're using the extract-text-webpack-plugin
, check out the webpack-rtl-plugin.
npm install rtl-css-loader --save-dev
Use it exactly like the css-loader:
module.exports = {
module: {
loaders: [
{
test: /\.css$/,
loaders: ['style', 'rtl-css']
},
]
}
};