SEO finding
Component styles are shipped many times over on one page
SEO Warning Severity: Medium
Part of the audit Page speed and Core Web Vitals. Finding id: seo.cssComponentDuplication.
What it costs you
The browser fetches and parses the same rules several times, and the page appears later.
What to do
Let the build combine component styles per page and remove copies of the same component's styles.
What it checks
- Files that delay showing the page
How to fix it
Combine component styles at build time
- Check whether the same component is bundled into several chunks, each with its own copy of its styles.
- Configure the build to extract shared component styles into one file per page or one shared file.
How to check: Run this rule again: no duplicates, fewer stylesheets per page.
Thresholds
| Name | Default | Meaning |
|---|---|---|
max_stylesheets | 15 | Report a page that loads more separate stylesheets than this. A starting value, not taken from a source. |