{"id":15646846,"url":"https://github.com/romainberger/webpack-rtl-plugin","last_synced_at":"2025-04-08T03:09:40.194Z","repository":{"id":46965356,"uuid":"57304766","full_name":"romainberger/webpack-rtl-plugin","owner":"romainberger","description":"Webpack plugin to produce a rtl css bundle","archived":false,"fork":false,"pushed_at":"2024-01-30T05:04:41.000Z","size":156,"stargazers_count":47,"open_issues_count":25,"forks_count":33,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-26T08:04:32.352Z","etag":null,"topics":["rtl","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romainberger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-28T13:39:45.000Z","updated_at":"2024-06-18T13:54:02.067Z","dependencies_parsed_at":"2024-06-18T14:07:32.093Z","dependency_job_id":null,"html_url":"https://github.com/romainberger/webpack-rtl-plugin","commit_stats":{"total_commits":55,"total_committers":11,"mean_commits":5.0,"dds":"0.36363636363636365","last_synced_commit":"aca883ad70671a5d2a90c676fe8ea60d42c8759b"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainberger%2Fwebpack-rtl-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainberger%2Fwebpack-rtl-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainberger%2Fwebpack-rtl-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainberger%2Fwebpack-rtl-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romainberger","download_url":"https://codeload.github.com/romainberger/webpack-rtl-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767234,"owners_count":20992547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rtl","webpack","webpack-plugin"],"created_at":"2024-10-03T12:15:22.029Z","updated_at":"2025-04-08T03:09:40.171Z","avatar_url":"https://github.com/romainberger.png","language":"JavaScript","readme":"# Webpack RTL Plugin [![Build Status](https://img.shields.io/travis/romainberger/webpack-rtl-plugin/master.svg?style=flat-square)](https://travis-ci.org/romainberger/webpack-rtl-plugin) [![npm version](https://img.shields.io/npm/v/webpack-rtl-plugin.svg?style=flat-square)](https://www.npmjs.com/package/webpack-rtl-plugin) [![npm downloads](https://img.shields.io/npm/dm/webpack-rtl-plugin.svg?style=flat-square)](https://www.npmjs.com/package/webpack-rtl-plugin)\n\nWebpack plugin to use in addition to [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to create a second css bundle, processed to be rtl.\n\nThis uses [rtlcss](https://github.com/MohammadYounes/rtlcss) under the hood, please refer to its documentation for supported properties.\n\nCheck out the [webpack-rtl-example](https://github.com/romainberger/webpack-rtl-example) to see an example of an app using the rtl-css-loader and webpack-rtl-plugin.\n\n## Installation\n\n```shell\n$ npm install webpack-rtl-plugin\n```\n\n## Usage\n\nAdd the plugin to your webpack configuration:\n\n```js\nconst WebpackRTLPlugin = require('webpack-rtl-plugin')\n\nmodule.exports = {\n  entry: path.join(__dirname, 'src/index.js'),\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js',\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.css$/,\n        use: [\n          MiniCssExtractPlugin.loader,\n          {\n            loader: \"css-loader\",\n            options: {\n              ...,\n            }\n          }\n        ]\n      }\n    ],\n  },\n  plugins: [\n    new MiniCssExtractPlugin({\n        filename: 'style.css',\n    }),\n    new WebpackRTLPlugin(),\n  ],\n}\n```\n\nThis will create the normal `style.css` and an additionnal `style.rtl.css`.\n\n## Options\n\n```\nnew WebpackRTLPlugin({\n  filename: 'style.[contenthash].rtl.css',\n  options: {},\n  plugins: [],\n  diffOnly: false,\n  minify: true,\n})\n```\n\n* `test` a RegExp (object or string) that must match asset filename\n* `filename` the filename of the result file. May contain patterns in brackets. Default to `style.css`.\n  * `[contenthash]` a hash of the content of the extracted file\n  * `[id]` the module identifier\n  * `[name]` the module name\n  * `[file]` the extracted file filename \n  * `[filebase]` the extracted file basename\n  * `[ext]` the extracted file extension\n  * May be an array of replace function arguments like `[/(\\.css)/i, '-rtl$1']`.\n    Replace applies to filename that specified in extract-text-webpack-plugin.\n* `options` Options given to `rtlcss`. See the [rtlcss documentation for available options](http://rtlcss.com/learn/usage-guide/options/).\n* `plugins` RTLCSS plugins given to `rtlcss`. See the [rtlcss documentation for writing plugins](http://rtlcss.com/learn/extending-rtlcss/writing-a-plugin/). Default to `[]`.\n* `diffOnly` If set to `true`, the stylesheet created will only contain the css that differs from the source stylesheet. Default to `false`.\n* `minify` will minify the css. You can also pass an object for the arguments passed to `cssnano`. Default to `true`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromainberger%2Fwebpack-rtl-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromainberger%2Fwebpack-rtl-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromainberger%2Fwebpack-rtl-plugin/lists"}