Skip to content

noldor/purifycss-webpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

npm install purifycss-loader

Usage

var PurifyCssPlugin = require('purifycss-loader/PurifyCssPlugin');

var webpackConfig = {
  // ...

  module: {
    loaders: [{
      test: /\.css$/, loader: "style-loader!css-loader!purifycss-loader"
    }]
  },

  plugins: [
    new PurifyCssPlugin(__dirname, '/index.html')
  ]
}

API

Pass in the filepath to the root html for us to detect classes there. PurifyCSS will look at all your bundles on its own.

About

Remove unused CSS with webpack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%