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

Commit 6332a24

Browse files
authored
Merge pull request #16 from thevtm/patch-1
Add { nodir: true } to glob.sync() in README Change globs from "/*" to "/**/*" in README Thank you!
2 parents 9dad449 + 56711e0 commit 6332a24

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = {
5050
plugins: [
5151
new ExtractTextPlugin('[name].css?[hash]'),
5252
new PurgecssPlugin({
53-
paths: glob.sync(`${PATHS.src}/*`)
53+
paths: glob.sync(`${PATHS.src}/**/*`, { nodir: true })
5454
})
5555
]
5656
}
@@ -73,14 +73,14 @@ const PATHS = {
7373

7474
// In the webpack configuration
7575
new PurgecssPlugin({
76-
paths: glob.sync(`${PATHS.src}/*`)
76+
paths: glob.sync(`${PATHS.src}/**/*`, { nodir: true })
7777
})
7878
```
7979

8080
If you want to regenerate the paths list on every compilation (e.g. with `--watch`), then you can also pass a function:
8181
```js
8282
new PurgecssPlugin({
83-
paths: () => glob.sync(`${PATHS.src}/*`)
83+
paths: () => glob.sync(`${PATHS.src}/**/*`, { nodir: true })
8484
})
8585
```
8686

@@ -90,7 +90,7 @@ You can specify entrypoints to the purgecss-webpack-plugin with the option only:
9090

9191
```js
9292
new PurgecssPlugin({
93-
paths: glob.sync(`${PATHS.src}/*`),
93+
paths: glob.sync(`${PATHS.src}/**/*`, { nodir: true }),
9494
only: ['bundle', 'vendor']
9595
})
9696
```

0 commit comments

Comments
 (0)