Skip to content

FullHuman/purgecss-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

purgecss-loader

Purgecss loader for Webpack

Installation

npm install @fullhuman/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: '@fullhuman/purgecss-loader',
            options: {
              content: [
                path.join(__dirname, 'src/components/**/*.vue')
              ],
              whitelistPatterns: [
                /alert/
              ]
            }
          }
        ]
      }
    ]
  }
}

About

Purgecss loader for webpack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published