Home

Awesome

(rtl) css loader for webpack Build Status

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.

Check out the webpack-rtl-example to see an example of an app using the rtl-css-loader and webpack-rtl-plugin.

installation

npm install rtl-css-loader --save-dev

Usage

Use it exactly like the css-loader:

module.exports = {
  module: {
    loaders: [
      {
        test: /\.css$/,
        loaders: ['style', 'rtl-css']
      },
    ]
  }
};

License

MIT