Coder Social home page Coder Social logo

jmhnilbog / mini-css-extract-plugin-with-rtl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from beshanoe/mini-css-extract-plugin-with-rtl

0.0 0.0 0.0 448 KB

mini-css-extract-plugin fork with support for WebpackRtlPlugin

License: MIT License

JavaScript 85.06% CSS 11.47% HTML 3.47%

mini-css-extract-plugin-with-rtl's Introduction

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.

npm install --save-dev mini-css-extract-plugin-with-rtl

Usage

Configuration

webpack.config.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

mini-css-extract-plugin-with-rtl's People

Contributors

alexander-akait avatar bawjensen avatar beshanoe avatar chenxsan avatar eloytoro avatar evilebottnawi avatar ganapativs avatar gerasimov avatar jahed avatar joshwiens avatar lfre avatar maisano avatar mannil avatar michael-ciniawsky avatar mike-diamond avatar mike-marcacci avatar ooflorent avatar piecyk avatar pierre-do avatar sassninja avatar shanamaid avatar simek avatar simon04 avatar sokra avatar stephan281094 avatar sylver avatar tiendq avatar unchai avatar verydanny avatar way2ex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.