🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@automattic/webpack-rtl-plugin

Package Overview
Dependencies
Maintainers
36
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@automattic/webpack-rtl-plugin

Webpack plugin to produce a rtl css bundle.

6.0.0
latest
Source
npm
Version published
Weekly downloads
3.6K
44.7%
Maintainers
36
Weekly downloads
 
Created
Source

Webpack RTL Plugin

Webpack plugin to use in addition to mini-css-extract-plugin to create a second css bundle, processed to be rtl.

This uses rtlcss under the hood, please refer to its documentation for supported properties.

Originally forked from https://github.com/romainberger/webpack-rtl-plugin, commit aca883ad70671a5d2a90c676fe8ea60d42c8759b (tag v2.0.0).

This plugin contains Automattic changes to the original webpack-rtl-plugin and is released as @automattic/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 @automattic/webpack-rtl-plugin

Usage

Add the plugin to your webpack configuration:

const WebpackRTLPlugin = require( '@automattic/webpack-rtl-plugin' );

module.exports = {
	entry: path.join( __dirname, 'src/index.js' ),
	output: {
		path: path.resolve( __dirname, 'dist' ),
		filename: 'bundle.js',
	},
	module: {
		rules: [
			{
				test: /\.css$/,
				use: [
					MiniCssExtractPlugin.loader,
					{
						loader: 'css-loader',
						options: {
							/*...,*/
						},
					},
				],
			},
		],
	},
	plugins: [
		new MiniCssExtractPlugin( {
			filename: 'style.css',
		} ),
		new WebpackRTLPlugin(),
	],
};

This will create the normal style.css and an additionnal style.rtl.css.

Options

new WebpackRTLPlugin({
  options: {},
  plugins: [],
})

Keywords

webpack

FAQs

Package last updated on 13 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts