@fullhuman/purgecss-loader

1.0.0 • Public • Published

purgecss-loader

Purgecss loader for Webpack

Installation

npm install purgecss-loader --save-dev

Usage

Here is an example of how to use the loader in a Webpack configuration with Vue.js Single File Components:

{
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [
          {
            loader: 'css-loader',
            options: { importLoaders: 1 }
          },
          {
            loader: 'purgecss-loader',
            options: {
              content: [
                path.join(__dirname, 'src/components/**/*.vue')
              ],
              whitelistPatterns: [
                /alert/
              ]
            }
          }
        ]
      }
    ]
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @fullhuman/purgecss-loader

Weekly Downloads

442

Version

1.0.0

License

MIT

Unpacked Size

4.88 kB

Total Files

9

Last publish

Collaborators

  • ffloriel
  • jsnanigans