A simple port of vue-loader for regular
Branch: 1.x-release
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__
lib
.gitignore
LICENSE
README.md
circle.yml
package.json
yarn.lock

README.md

regular-loader

build status npm package npm package next license

Installation

# for webpack 2/3/4
npm i regular-loader@^1.0.0 -D
# for webpack 1
npm i regular-loader@^0.1.5 -D

Example

For webpack 2/3

webpack.config.js

const ExtractTextPlugin = require( 'extract-text-webpack-plugin' );

module.exports = {
    // ...
    module: {
      rules: [{
        test: /\.rgl$/,
        use: {
          loader: 'regular-loader',
          options: {
            extractCSS: true
          }
        },
      }]
    },
    plugins: [
      new ExtractTextPlugin( 'app.css' )
    ]
};

For webpack 4

webpack.config.js

const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );

module.exports = {
    // ...
    module: {
      rules: [{
        test: /\.rgl$/,
        use: {
          loader: 'regular-loader',
          options: {
            extractCSS: true
          }
        },
      }]
    },
    plugins: [
      new MiniCssExtractPlugin( {
          filename: 'app.css',
      } )
    ]
};

Related

Thanks