webpack loader for css purify and deduplicate, remove unused and duplicated css
npm install postifycss-loader --save-dev
var PostifyCssPlugin = ; { let baseLoader = `css?importLoaders=!autoprefixer
new PostifyCssPlugin(options)
-
staticContent
// String|Array [optional], absolute path of html or js files, contents will be concated and passed along to purifycss(contents,..); -
override
// boolean [optional], whether to override the output bundle css file, defaultfalse
.`true` => emit the purified and deduplicated css file `false` => emit (the purified file) and (the purified & deduplicated file with suffixed filename)
-
suffix
// string [optional], ifoverride!==true
, use this as the emited postified css filename suffix, default.pf
;
case: 192kb -> 33kb