mini-css-extract-plugin-with-rtl

extracts CSS into separate files

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
mini-css-extract-plugin-with-rtl
0.1.54 years ago4 years agoMinified + gzip package size for mini-css-extract-plugin-with-rtl in KB

Readme

This plugis is a fork of mini-css-extract-plugin but with a support for WebpackRTLPlugin. Namely, it allows to load async CSS files depending of page's current direction. Please check mentioned packages to learn how to use them. ```bash npm install --save-dev mini-css-extract-plugin-with-rtl ```

Usage

Configuration

webpack.config.js ```js const MiniCssExtractPlugin = require("mini-css-extract-plugin-with-rtl"); const WebpackRTLPlugin = require("webpack-rtl-plugin"); module.exports = { plugins:
new MiniCssExtractPlugin({
filename: "[name].css",
rtlEnabled: true,
rtlGlobalVar: 'pageDir' // Value should be 'rtl' to activate RTL mode. If not specified, document.dir will be used instead
}),
new WebpackRTLPlugin() // You must not pass filename option
, module: {
rules: [
{
test: /\.css$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
},
"css-loader"
]
}
]
} } ```

License

MIT