Skip to content

Commit 477ce00

Browse files
committed
Document error recovery
1 parent 95bedf8 commit 477ce00

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ To see all of the available options, use the `--help` argument:
177177
npx parcel-css --help
178178
```
179179

180+
### Error recovery
181+
182+
By default, Parcel CSS is strict, and will error when parsing an invalid rule or declaration. However, sometimes you may encounter a third party library that you can't easily modify, which unintentionally contains invalid syntax, or IE-specific hacks. In these cases, you can enable the `errorRecovery` option (or `--error-recovery` CLI flag). This will skip over invalid rules and declarations, omitting them in the output, and producing a warning instead of an error. You should also open an issue or PR to fix the issue in the library if possible.
183+
180184
## Benchmarks
181185

182186
<img width="666" alt="image" src="https://user-images.githubusercontent.com/19409/153888593-591a3c34-e401-4b30-94ac-7f8eb3c0b242.png#gh-light-mode-only">

0 commit comments

Comments
 (0)