Skip to content

Commit e8af506

Browse files
committed
docs: add new options dynamicAttributes and skippedContentGlobs
1 parent ff1c558 commit e8af506

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/configuration.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,3 +323,20 @@ Blocklist will block the CSS selectors from appearing in the final output CSS. T
323323
blocklist: ['usedClass', /^nav-/]
324324
```
325325
Even if nav-links and usedClass are found by an extractor, they will be removed.
326+
327+
- **skippedContentGlobs**
328+
329+
If you provide globs for the `content` parameter, you can use this option to exclude certain files or folders that would otherwise be scanned. Pass an array of globs matching items that should be excluded. (Note: this option has no effect if `content` is not globs.)
330+
331+
```ts
332+
skippedContentGlobs: ['node_modules/**', 'components/**']
333+
```
334+
Here, PurgeCSS will not scan anything in the "node_modules" and "components" folders.
335+
336+
- **dynamicAttributes**
337+
338+
Option to add custom CSS attribute selectors like "aria-selected", "data-selected", ...etc.
339+
340+
```ts
341+
dynamicAttributes: ["aria-selected"]
342+
```

0 commit comments

Comments
 (0)