You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: check if file exists in chunk after only filter
* test: update simple-with-exclusion test case of purgecss-webpack-plugin to actually test for purgecss exclusion
* docs: only option checks against chunk names instead of entrypoints
If you need multiple paths use the npm package `glob-all` instead of `glob`, then you can use this syntax:
92
91
93
92
```js
@@ -97,70 +96,70 @@ new PurgecssPlugin({
97
96
])
98
97
}),
99
98
```
99
+
100
100
to filter out directories see the glob-all documentation [here](https://www.npmjs.com/package/glob-all#filtering-out-directories).
101
101
102
102
## Options
103
103
104
104
The options available in purgecss [Configuration](https://www.purgecss.com/configuration.html) are also available in the webpack plugin, with the exception of the `css` and `content` options.
105
105
106
-
*#### paths
106
+
-#### paths
107
107
108
108
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.
109
109
110
110
> 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.
If you want to regenerate the list of paths on every compilation (e.g. when using `--watch`), then you can also pass a function to the `paths` option as in the following example:
0 commit comments