Skip to content

Commit c5ffd57

Browse files
committed
docs: add note about noDir for webpack plugin
1 parent 479ec9d commit c5ffd57

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/plugins/webpack.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ The options available in purgecss [Configuration](https://www.purgecss.com/confi
8888

8989
With the webpack plugin, you can specify the content that should be analyzed by purgecss by providing an array of filenames. These can be html, pug, blade, ... files. You can also use a module like `glob` or `glob-all` to easily get a list of files.
9090

91+
> You likely need to pass `{ noDir: true }` as an option to `glob.sync()` as `glob.sync` is matching a dir which the plugin can't operate on.
92+
9193
```js
9294
const PurgecssPlugin = require('purgecss-webpack-plugin')
9395
const glob = require('glob')

0 commit comments

Comments
 (0)