1- # purgecss-webpack-plugin
2- <!-- [](https://travis-ci.org/FullHuman/purgecss-webpack-plugin)
3- []() -->
1+ # purgecss-webpack-plugin
2+
3+ [ ![ Build Status] ( https://travis-ci.org/FullHuman/purgecss-webpack-plugin.svg?branch=master )] ( https://travis-ci.org/FullHuman/purgecss-webpack-plugin )
4+ [ ![ CircleCi] ( https://circleci.com/gh/FullHuman/purgecss-webpack-plugin/tree/master.svg?style=shield )] ( )
45[ ![ dependencies Status] ( https://david-dm.org/fullhuman/purgecss-webpack-plugin/status.svg )] ( https://david-dm.org/fullhuman/purgecss-webpack-plugin )
56[ ![ devDependencies Status] ( https://david-dm.org/fullhuman/purgecss-webpack-plugin/dev-status.svg )] ( https://david-dm.org/fullhuman/purgecss-webpack-plugin?type=dev )
7+ [ ![ Codacy Badge] ( https://api.codacy.com/project/badge/Grade/c23bd13d30104a7a89bed239166aaf69 )] ( https://www.codacy.com/app/FullHuman/purgecss-webpack-plugin?utm_source=github.com&utm_medium=referral&utm_content=FullHuman/purgecss-webpack-plugin&utm_campaign=Badge_Grade )
8+ [ ![ styled with prettier] ( https://img.shields.io/badge/styled_with-prettier-ff69b4.svg )] ( https://github.com/prettier/prettier )
9+ [ ![ npm] ( https://img.shields.io/npm/v/purgecss-webpack-plugin.svg )] ( https://www.npmjs.com/package/purgecss-webpack-plugin )
10+ [ ![ license] ( https://img.shields.io/github/license/fullhuman/purgecss-webpack-plugin.svg )] ( )
611
712[ Webpack] ( https://github.com/webpack/webpack ) plugin to remove unused css.
813
@@ -21,33 +26,32 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin')
2126const PurgecssPlugin = require (' purgecss-webpack-plugin' )
2227
2328const PATHS = {
24- src: path .join (__dirname , ' src' )
29+ src: path .join (__dirname , ' src' )
2530}
2631
2732module .exports = {
28- entry: ' ./src/index.js' ,
29- output: {
30- filename: ' bundle.js' ,
31- path: path .join (__dirname , ' dist' )
32- },
33- module: {
34- rules: [
35- {
36- test: / \. css$ / ,
37- use: ExtractTextPlugin .extract ({
38- fallback: ' style-loader' ,
39- use: ' css-loader?sourceMap'
40- })
41- }
42- ]
43- },
44- plugins: [
45- new ExtractTextPlugin (' [name].css?[hash]' ),
46- new PurgecssPlugin ({
47- paths: glob .sync (` ${ PATHS .src } /*` ),
48- styleExtensions: [' .css' ]
33+ entry: ' ./src/index.js' ,
34+ output: {
35+ filename: ' bundle.js' ,
36+ path: path .join (__dirname , ' dist' )
37+ },
38+ module: {
39+ rules: [
40+ {
41+ test: / \. css$ / ,
42+ use: ExtractTextPlugin .extract ({
43+ fallback: ' style-loader' ,
44+ use: ' css-loader?sourceMap'
4945 })
46+ }
5047 ]
48+ },
49+ plugins: [
50+ new ExtractTextPlugin (' [name].css?[hash]' ),
51+ new PurgecssPlugin ({
52+ paths: glob .sync (` ${ PATHS .src } /*` )
53+ })
54+ ]
5155}
5256```
5357
@@ -57,19 +61,18 @@ Please read [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for details on our code
5761
5862## Versioning
5963
60- We use [ SemVer] ( http://semver.org/ ) for versioning.
61-
64+ We use [ SemVer] ( http://semver.org/ ) for versioning.
6265
6366## Acknowledgment
6467
6568Purgecss was originally thought as the v2 of purifycss. And because of it, it is greatly inspired by it.
66- The plugins such as purgecss-webpack-plugin are based on the purifycss plugin.
67- Below is the list of the purifycss repositories:
68- - [ purifycss] ( https://github.com/purifycss/purifycss )
69- - [ gulp-purifycss] ( https://github.com/purifycss/gulp-purifycss )
70- - [ purifycss-webpack] ( https://github.com/webpack-contrib/purifycss-webpack )
69+ The plugins such as purgecss-webpack-plugin are based on the purifycss plugin.
70+ Below is the list of the purifycss repositories:
71+
72+ * [ purifycss] ( https://github.com/purifycss/purifycss )
73+ * [ gulp-purifycss] ( https://github.com/purifycss/gulp-purifycss )
74+ * [ purifycss-webpack] ( https://github.com/webpack-contrib/purifycss-webpack )
7175
7276## License
7377
7478This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details
75-
0 commit comments