Skip to content

fork `rtlcss-webpack-plugin` to make it more `rspack` ๐Ÿ‘€

Notifications You must be signed in to change notification settings

cbbfcd/rtlcss-rspack-plugin

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

30 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

forked from wix/rtlcss-webpack-plugin to support rspack

๐Ÿ”ฅ๐Ÿ”ฅ only support [fullhash], [name]


RtlCss Webpack Plugin Build Status npm version npm downloads

Webpack plugin to use in addition to extract-text-webpack-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.

This is almost entirely based on work done in webpack-rtl-plugin

Installation

$ npm install rtlcss-rspack-plugin

Usage

Add the plugin to your webpack configuration:

import RtlCssPlugin from 'rtlcss-rspack-plugin';

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

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

Options

new RtlCssPlugin('[name].rtl.css');
new RtlCssPlugin({filename: '[name].rtl.css'});
  • filename Name of the result file. May contain [name], [fullhash]

About

fork `rtlcss-webpack-plugin` to make it more `rspack` ๐Ÿ‘€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 60.9%
  • TypeScript 39.1%