Skip to content
This repository was archived by the owner on Feb 1, 2020. It is now read-only.

Commit 9c01351

Browse files
committed
Add glob-all example to readme
1 parent 236f4ed commit 9c01351

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,24 @@ module.exports = {
6262
},
6363
plugins: [
6464
new MiniCssExtractPlugin({
65-
filename: "[name].css"
65+
filename: "[name].css",
6666
}),
6767
new PurgecssPlugin({
68-
paths: glob.sync(`${PATHS.src}/**/*`, { nodir: true })
69-
})
68+
paths: glob.sync(`${PATHS.src}/**/*`, { nodir: true }),
69+
}),
7070
]
7171
}
72-
73-
7472
```
73+
### Multiple paths
74+
If you need multiple paths use the npm package `glob-all` instead of `glob`, then you can use this syntax:
75+
```javascript
76+
new PurgecssPlugin({
77+
paths: glob.sync([
78+
// ...
79+
])
80+
}),
81+
```
82+
to filter out directories see the glob-all documentation [here](https://www.npmjs.com/package/glob-all#filtering-out-directories).
7583

7684
### Webpack 3 (with extract-text-webpack-plugin)
7785
```js

0 commit comments

Comments
 (0)