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 )] ( )
4
5
[ ![ dependencies Status] ( https://david-dm.org/fullhuman/purgecss-webpack-plugin/status.svg )] ( https://david-dm.org/fullhuman/purgecss-webpack-plugin )
5
6
[ ![ 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 )] ( )
6
11
7
12
[ Webpack] ( https://github.com/webpack/webpack ) plugin to remove unused css.
8
13
@@ -21,33 +26,32 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin')
21
26
const PurgecssPlugin = require (' purgecss-webpack-plugin' )
22
27
23
28
const PATHS = {
24
- src: path .join (__dirname , ' src' )
29
+ src: path .join (__dirname , ' src' )
25
30
}
26
31
27
32
module .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'
49
45
})
46
+ }
50
47
]
48
+ },
49
+ plugins: [
50
+ new ExtractTextPlugin (' [name].css?[hash]' ),
51
+ new PurgecssPlugin ({
52
+ paths: glob .sync (` ${ PATHS .src } /*` )
53
+ })
54
+ ]
51
55
}
52
56
```
53
57
@@ -57,19 +61,18 @@ Please read [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for details on our code
57
61
58
62
## Versioning
59
63
60
- We use [ SemVer] ( http://semver.org/ ) for versioning.
61
-
64
+ We use [ SemVer] ( http://semver.org/ ) for versioning.
62
65
63
66
## Acknowledgment
64
67
65
68
Purgecss 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 )
71
75
72
76
## License
73
77
74
78
This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details
75
-
0 commit comments