Skip to content

break(svgr): prefix inline SVG ids to avoid clashes between SVGs (AI-assisted) - #12690

Merged
slorber merged 2 commits into
claude/svgr-ids-clash-reprofrom
claude/svgr-prefix-ids
Oct 16, 2026
Merged

slorber merged 2 commits into
claude/svgr-ids-clash-reprofrom
claude/svgr-prefix-ids

Conversation

@slorber

@slorber slorber commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Breaking Changes

@docusaurus/plugin-svgr now prefixes the ids inside inline SVGs (SVG files imported as React components). The default SVGO config adds the prefixIds plugin, using a short hash of the site-relative SVG file path as prefix: <linearGradient id="a"> becomes <linearGradient id="svg-3f2a1c-a">. References to the ids (url(#a), href="#a", ids in the SVG <style>) are updated too. Class names are not prefixed.

Who is affected: sites whose CSS code, JavaScript code (document.getElementById()…) or URL fragments target an id inside an inline SVG that contains a <style> or <script> element. Other SVGs are not affected in practice: SVGO already removed their unreferenced ids and minified the referenced ones in v3, so their original ids were never in the HTML.

Sites that already provide their own svgrConfig.svgoConfig, or use svgoConfig: undefined with an svgo.config.js file, are not affected: their SVGO config replaces the default one.

How to migrate: target SVG elements with class names or attribute selectors instead of ids, for example:

.mySvg [fill='#FFFF50'] {
  fill: greenyellow;
}

How to restore the v3 behavior: provide the Docusaurus v3 SVGO config, which is the v4 default config without the prefixIds plugin:

export default {
  presets: [
    [
      'classic',
      {
        svgr: {
          svgrConfig: {
            svgoConfig: {
              plugins: [
                {
                  name: 'preset-default',
                  params: {
                    overrides: {
                      removeTitle: false,
                      removeViewBox: false,
                    },
                  },
                },
              ],
            },
          },
        },
      },
    ],
  ],
};

Use the @docusaurus/plugin-svgr plugin options (same svgrConfig object) if you don't use the classic preset. With this config, several SVGs inlined in the same page can clash again.

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Fix #8297, v4 TODO in svgrLoader.ts, discussed in #10679.

SVGO's cleanupIds plugin minifies the ids of each SVG file independently. Most SVGs using gradients, masks or clip paths end up using the same ids (a, b, c…). When several SVGs are inlined in the same page, these ids clash, and SVGs render with the gradients or masks of another SVG. This is a long-standing pain point (#8297, #8191, #10205, #10211, #10679), and users had to find and copy custom SVGO configs to fix it.

SVGR enables prefixIds by default, but Docusaurus lost it because it provides its own svgoConfig. Our own website already used prefixIds through a custom svgo.config.js (removed in #12689).

Implementation choices:

  • Prefix = hash of the site-relative file path, not the file name (SVGR/SVGO default): two SVGs with the same name in different folders would still clash. The path is relative to the site dir, so ids are stable across machines and identical in the server and client bundles. The dogfood page has two gradient.svg files in different folders to cover this.
  • Class names are not prefixed (prefixClassNames: false): users may target the class names inside SVGs with their own CSS (attribute selectors and class names are the recommended way to style inline SVGs in our docs).
  • SVGO v4 is out of scope: SVGR 8.1.0 (latest, Aug 2023) still depends on svgo@^3. Its v4 defaults (no removeTitle/removeViewBox) match the overrides we already use.

I also documented the default SVGR config in the plugin docs: the svgrConfig option is shallow-merged over it, so providing svgoConfig replaces the default SVGO config. The docs only describe the current behavior; the v3 → v4 migration instructions above are meant for the future v4 migration guide.

(AI-assisted)

Test Plan

  • Unit tests running the real SVGR + SVGO pipeline: ids are prefixed, references updated, same name in different folders gives different ids, ids are stable across site dirs, classes/viewBox/title are kept, and the v3 config can be restored.
  • Dogfood page from test(svgr): reproduce inline SVG id clashes on the dogfood page (AI-assisted) #12689: all inline SVGs now match their <img> reference rendering, and the 139 ids of the page are unique (they were 53 unique ids out of 139 before).
  • Argos

Test links

Deploy preview: https://deploy-preview-12690--docusaurus-2.netlify.app/

Related issues/PRs

🤖 Generated with Claude Code

@slorber
slorber requested a review from Josh-Cena as a code owner October 16, 2026 09:38
@slorber slorber added pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. Argos Add this label to run UI visual regression tests. See argos.yml GH action. labels Oct 16, 2026
@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label Oct 16, 2026
@slorber
slorber added this pull request to stack #12691 October 16, 2026 09:38
@slorber slorber added Argos Add this label to run UI visual regression tests. See argos.yml GH action. and removed Argos Add this label to run UI visual regression tests. See argos.yml GH action. labels Oct 16, 2026
@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ [V2]

Name Link
🔨 Latest commit a1e0382
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6ad1f4ccd738ba42dadbd251
😎 Deploy Preview https://deploy-preview-12690--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Size Change: +13.2 kB (+0.11%)

Total Size: 12.5 MB

📦 View Changed
Filename Size Change
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 57.6 kB +12.1 kB (+26.71%) 🚨
website/build/docs/markdown-features/assets.html 93.7 kB +1.1 kB (+1.19%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 28.5 kB 0 B
website/.docusaurus/globalData.json 39.1 kB 0 B
website/.docusaurus/i18n.json 1.36 kB 0 B
website/.docusaurus/registry.js 181 kB 0 B
website/.docusaurus/routes.js 90 kB 0 B
website/.docusaurus/routesChunkNames.json 94.2 kB 0 B
website/.docusaurus/site-metadata.json 2.59 kB 0 B
website/build/assets/css/styles.**********.css 145 kB 0 B
website/build/assets/js/main.**********.js 760 kB 0 B
website/build/assets/js/runtime~main.**********.js 42.1 kB 0 B
website/build/blog.html 79.3 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 67.6 kB +1 B (0%)
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 46.5 kB +1 B (0%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 51.1 kB +6 B (+0.01%)
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 30.5 kB +1 B (0%)
website/build/blog/2019/12/30/docusaurus-2019-recap.html 41.6 kB +1 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 34.1 kB +1 B (0%)
website/build/blog/2021/01/19/docusaurus-2020-recap.html 53.1 kB +1 B (0%)
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 49.1 kB +1 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 49.6 kB +1 B (0%)
website/build/blog/2021/11/21/algolia-docsearch-migration.html 56 kB +1 B (0%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 44.8 kB +1 B (0%)
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 137 kB +1 B (0%)
website/build/blog/2022/09/01/docusaurus-2.1.html 52.1 kB +1 B (0%)
website/build/blog/archive.html 24.9 kB 0 B
website/build/blog/authors.html 52.2 kB 0 B
website/build/blog/authors/j-marcey.html 72.3 kB 0 B
website/build/blog/authors/josh-cena.html 48.5 kB 0 B
website/build/blog/authors/lex-111.html 57.5 kB 0 B
website/build/blog/authors/slorber.html 83.1 kB 0 B
website/build/blog/authors/slorber/page/2.html 82.3 kB 0 B
website/build/blog/authors/slorber/page/3.html 85.9 kB 0 B
website/build/blog/authors/slorber/page/4.html 98.6 kB 0 B
website/build/blog/authors/slorber/page/5.html 55 kB 0 B
website/build/blog/authors/yangshun.html 68.3 kB 0 B
website/build/blog/authors/zpao.html 49 kB 0 B
website/build/blog/page/2.html 78.5 kB 0 B
website/build/blog/page/3.html 82.9 kB 0 B
website/build/blog/page/4.html 87.4 kB 0 B
website/build/blog/page/5.html 74.7 kB 0 B
website/build/blog/page/6.html 42.2 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 130 kB +1 B (0%)
website/build/blog/releases/2.2.html 52.3 kB +1 B (0%)
website/build/blog/releases/2.3.html 62.9 kB 0 B
website/build/blog/releases/2.4.html 66.7 kB +1 B (0%)
website/build/blog/releases/3.0.html 109 kB +1 B (0%)
website/build/blog/releases/3.1.html 54.9 kB +1 B (0%)
website/build/blog/releases/3.2.html 50.8 kB +1 B (0%)
website/build/blog/releases/3.3.html 58 kB +1 B (0%)
website/build/blog/releases/3.4.html 57.2 kB 0 B
website/build/blog/releases/3.5.html 59.9 kB +1 B (0%)
website/build/blog/releases/3.6.html 77.1 kB 0 B
website/build/blog/releases/3.7.html 52.6 kB +1 B (0%)
website/build/blog/releases/3.8.html 88.4 kB 0 B
website/build/blog/releases/3.9.html 62.8 kB +1 B (0%)
website/build/blog/releases/3.10.html 93.5 kB +1 B (0%)
website/build/blog/tags.html 28.7 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 127 kB +1 B (0%)
website/build/docs.html 52.6 kB 0 B
website/build/docs/advanced.html 31.7 kB 0 B
website/build/docs/advanced/architecture.html 30.3 kB +4 B (+0.01%)
website/build/docs/advanced/client.html 70.7 kB +1 B (0%)
website/build/docs/advanced/plugins.html 55.7 kB +1 B (0%)
website/build/docs/advanced/routing.html 71 kB +1 B (0%)
website/build/docs/advanced/ssg.html 75.6 kB +1 B (0%)
website/build/docs/api/docusaurus-config.html 234 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 51.6 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 36.9 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 35.9 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 37.2 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 40.8 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/logger.html 39.3 kB +1 B (0%)
website/build/docs/api/misc/create-docusaurus.html 38.5 kB +8 B (+0.02%)
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 61.8 kB 0 B
website/build/docs/api/plugin-methods/extend-infrastructure.html 59.3 kB 0 B
website/build/docs/api/plugin-methods/i18n-lifecycles.html 58.2 kB +1 B (0%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 162 kB +1 B (0%)
website/build/docs/api/plugin-methods/static-methods.html 45.3 kB +1 B (0%)
website/build/docs/api/plugins.html 32.7 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 60.3 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 186 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 192 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 75.3 kB +6 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-css-cascade-layers.html 58.2 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 48.6 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 49.5 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 48.3 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 57.9 kB +4 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 118 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 40.9 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 91.3 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 41.3 kB +1 B (0%)
website/build/docs/api/themes.html 30.3 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-classic.html 44.2 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 37.2 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 36 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 33.7 kB 0 B
website/build/docs/api/themes/configuration.html 254 kB +1 B (0%)
website/build/docs/blog.html 205 kB +1 B (0%)
website/build/docs/browser-support.html 47.4 kB +1 B (0%)
website/build/docs/category/getting-started.html 28.6 kB 0 B
website/build/docs/category/guides.html 39 kB 0 B
website/build/docs/category/miscellaneous.html 28.4 kB 0 B
website/build/docs/cli.html 67.3 kB +1 B (0%)
website/build/docs/configuration.html 93.8 kB +1 B (0%)
website/build/docs/create-doc.html 62.4 kB +1 B (0%)
website/build/docs/creating-pages.html 57.7 kB +1 B (0%)
website/build/docs/deployment.html 67.6 kB 0 B
website/build/docs/deployment/github-pages.html 120 kB 0 B
website/build/docs/deployment/netlify.html 39.4 kB 0 B
website/build/docs/deployment/vercel.html 33.4 kB 0 B
website/build/docs/docs-introduction.html 50.8 kB 0 B
website/build/docs/docs-multi-instance.html 74.9 kB +1 B (0%)
website/build/docs/docusaurus-core.html 227 kB 0 B
website/build/docs/guides/whats-next.html 33.3 kB 0 B
website/build/docs/i18n/crowdin.html 148 kB 0 B
website/build/docs/i18n/git.html 81.2 kB +8 B (+0.01%)
website/build/docs/i18n/introduction.html 49.9 kB 0 B
website/build/docs/i18n/tutorial.html 170 kB 0 B
website/build/docs/installation.html 71.7 kB 0 B
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 85.7 kB +2 B (0%)
website/build/docs/markdown-features/admonitions.html 118 kB +1 B (0%)
website/build/docs/markdown-features/code-blocks.html 223 kB +13 B (+0.01%)
website/build/docs/markdown-features/diagrams.html 62 kB 0 B
website/build/docs/markdown-features/head-metadata.html 51.6 kB +1 B (0%)
website/build/docs/markdown-features/links.html 41.5 kB +6 B (+0.01%)
website/build/docs/markdown-features/math-equations.html 92.8 kB +1 B (0%)
website/build/docs/markdown-features/plugins.html 96.9 kB +1 B (0%)
website/build/docs/markdown-features/react.html 132 kB 0 B
website/build/docs/markdown-features/tabs.html 141 kB +1 B (0%)
website/build/docs/markdown-features/toc.html 88 kB +1 B (0%)
website/build/docs/migration.html 40.3 kB +1 B (0%)
website/build/docs/migration/v2.html 40 kB +1 B (0%)
website/build/docs/migration/v2/automated.html 40.7 kB +1 B (0%)
website/build/docs/migration/v2/manual.html 192 kB +1 B (0%)
website/build/docs/migration/v2/translated-sites.html 51.4 kB +1 B (0%)
website/build/docs/migration/v2/versioned-sites.html 61 kB +1 B (0%)
website/build/docs/migration/v3.html 193 kB 0 B
website/build/docs/playground.html 32.1 kB 0 B
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 125 kB +1 B (0%)
website/build/docs/seo.html 89.1 kB 0 B
website/build/docs/sidebar.html 141 kB 0 B
website/build/docs/sidebar/autogenerated.html 148 kB +1 B (0%)
website/build/docs/sidebar/items.html 177 kB +1 B (0%)
website/build/docs/sidebar/multiple-sidebars.html 62.9 kB +1 B (0%)
website/build/docs/static-assets.html 55.2 kB 0 B
website/build/docs/styling-layout.html 142 kB 0 B
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 113 kB +1 B (0%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 67.4 kB 0 B
website/build/docs/using-plugins.html 107 kB 0 B
website/build/docs/versioning.html 93.4 kB 0 B
website/build/index.html 37.1 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_FASTER

@argos-ci

argos-ci Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
screenshots (Inspect) 👍 Approved by Sébastien Lorber 3 changed Oct 16, 2026, 9:58 AM
text-snapshots (Inspect) 👍 Approved by Sébastien Lorber 2 changed Oct 16, 2026, 9:59 AM

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 59 🟢 98 🟢 100 🟢 100 Report
/docs/installation 🟠 62 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 68 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 69 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 66 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 68 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 67 🟢 100 🟢 100 🟠 86 Report

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Size Change: +13.2 kB (+0.11%)

Total Size: 12.5 MB

📦 View Changed
Filename Size Change
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 57.6 kB +12.1 kB (+26.71%) 🚨
website/build/docs/markdown-features/assets.html 93.7 kB +1.1 kB (+1.19%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 28.5 kB 0 B
website/.docusaurus/globalData.json 39.1 kB 0 B
website/.docusaurus/i18n.json 1.36 kB 0 B
website/.docusaurus/registry.js 181 kB 0 B
website/.docusaurus/routes.js 90 kB 0 B
website/.docusaurus/routesChunkNames.json 94.2 kB 0 B
website/.docusaurus/site-metadata.json 2.59 kB 0 B
website/build/assets/css/styles.**********.css 145 kB 0 B
website/build/assets/js/main.**********.js 758 kB 0 B
website/build/assets/js/runtime~main.**********.js 41.9 kB 0 B
website/build/blog.html 79.3 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 67.6 kB +1 B (0%)
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 46.5 kB +1 B (0%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 51.1 kB +6 B (+0.01%)
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 30.5 kB +1 B (0%)
website/build/blog/2019/12/30/docusaurus-2019-recap.html 41.6 kB +1 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 34.1 kB +1 B (0%)
website/build/blog/2021/01/19/docusaurus-2020-recap.html 53.1 kB +1 B (0%)
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 49.1 kB +1 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 49.6 kB +1 B (0%)
website/build/blog/2021/11/21/algolia-docsearch-migration.html 56 kB +1 B (0%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 44.8 kB +1 B (0%)
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 137 kB +1 B (0%)
website/build/blog/2022/09/01/docusaurus-2.1.html 52.1 kB +1 B (0%)
website/build/blog/archive.html 24.9 kB 0 B
website/build/blog/authors.html 52.2 kB 0 B
website/build/blog/authors/j-marcey.html 72.3 kB 0 B
website/build/blog/authors/josh-cena.html 48.5 kB 0 B
website/build/blog/authors/lex-111.html 57.5 kB 0 B
website/build/blog/authors/slorber.html 83.1 kB 0 B
website/build/blog/authors/slorber/page/2.html 82.3 kB 0 B
website/build/blog/authors/slorber/page/3.html 85.9 kB 0 B
website/build/blog/authors/slorber/page/4.html 98.6 kB 0 B
website/build/blog/authors/slorber/page/5.html 55 kB 0 B
website/build/blog/authors/yangshun.html 68.3 kB 0 B
website/build/blog/authors/zpao.html 49 kB 0 B
website/build/blog/page/2.html 78.5 kB 0 B
website/build/blog/page/3.html 82.9 kB 0 B
website/build/blog/page/4.html 87.4 kB 0 B
website/build/blog/page/5.html 74.7 kB 0 B
website/build/blog/page/6.html 42.2 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 130 kB +1 B (0%)
website/build/blog/releases/2.2.html 52.3 kB +1 B (0%)
website/build/blog/releases/2.3.html 62.9 kB 0 B
website/build/blog/releases/2.4.html 66.7 kB +1 B (0%)
website/build/blog/releases/3.0.html 109 kB +1 B (0%)
website/build/blog/releases/3.1.html 54.9 kB +1 B (0%)
website/build/blog/releases/3.2.html 50.8 kB +1 B (0%)
website/build/blog/releases/3.3.html 58 kB +1 B (0%)
website/build/blog/releases/3.4.html 57.2 kB 0 B
website/build/blog/releases/3.5.html 59.9 kB +1 B (0%)
website/build/blog/releases/3.6.html 77.1 kB 0 B
website/build/blog/releases/3.7.html 52.6 kB +1 B (0%)
website/build/blog/releases/3.8.html 88.4 kB 0 B
website/build/blog/releases/3.9.html 62.8 kB +1 B (0%)
website/build/blog/releases/3.10.html 93.5 kB +1 B (0%)
website/build/blog/tags.html 28.7 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 127 kB +1 B (0%)
website/build/docs.html 52.6 kB 0 B
website/build/docs/advanced.html 31.7 kB 0 B
website/build/docs/advanced/architecture.html 30.3 kB +4 B (+0.01%)
website/build/docs/advanced/client.html 70.7 kB +1 B (0%)
website/build/docs/advanced/plugins.html 55.7 kB +1 B (0%)
website/build/docs/advanced/routing.html 71 kB +1 B (0%)
website/build/docs/advanced/ssg.html 75.6 kB +1 B (0%)
website/build/docs/api/docusaurus-config.html 234 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 51.6 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 36.9 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 35.9 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 37.2 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 40.8 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/logger.html 39.3 kB +1 B (0%)
website/build/docs/api/misc/create-docusaurus.html 38.5 kB +8 B (+0.02%)
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 61.8 kB 0 B
website/build/docs/api/plugin-methods/extend-infrastructure.html 59.3 kB 0 B
website/build/docs/api/plugin-methods/i18n-lifecycles.html 58.2 kB +1 B (0%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 162 kB +1 B (0%)
website/build/docs/api/plugin-methods/static-methods.html 45.3 kB +1 B (0%)
website/build/docs/api/plugins.html 32.7 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 60.3 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 186 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 192 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 75.3 kB +6 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-css-cascade-layers.html 58.2 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 48.6 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 49.5 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 48.3 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 57.9 kB +4 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 118 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 40.9 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 91.3 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 41.3 kB +1 B (0%)
website/build/docs/api/themes.html 30.3 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-classic.html 44.2 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 37.2 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 36 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 33.7 kB 0 B
website/build/docs/api/themes/configuration.html 254 kB +1 B (0%)
website/build/docs/blog.html 205 kB +1 B (0%)
website/build/docs/browser-support.html 47.4 kB +1 B (0%)
website/build/docs/category/getting-started.html 28.6 kB 0 B
website/build/docs/category/guides.html 39 kB 0 B
website/build/docs/category/miscellaneous.html 28.4 kB 0 B
website/build/docs/cli.html 67.3 kB +1 B (0%)
website/build/docs/configuration.html 93.8 kB +1 B (0%)
website/build/docs/create-doc.html 62.4 kB +1 B (0%)
website/build/docs/creating-pages.html 57.7 kB +1 B (0%)
website/build/docs/deployment.html 67.6 kB 0 B
website/build/docs/deployment/github-pages.html 120 kB 0 B
website/build/docs/deployment/netlify.html 39.4 kB 0 B
website/build/docs/deployment/vercel.html 33.4 kB 0 B
website/build/docs/docs-introduction.html 50.8 kB 0 B
website/build/docs/docs-multi-instance.html 74.9 kB +1 B (0%)
website/build/docs/docusaurus-core.html 227 kB 0 B
website/build/docs/guides/whats-next.html 33.3 kB 0 B
website/build/docs/i18n/crowdin.html 148 kB 0 B
website/build/docs/i18n/git.html 81.2 kB +8 B (+0.01%)
website/build/docs/i18n/introduction.html 49.9 kB 0 B
website/build/docs/i18n/tutorial.html 170 kB 0 B
website/build/docs/installation.html 71.7 kB 0 B
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 85.7 kB +2 B (0%)
website/build/docs/markdown-features/admonitions.html 118 kB +1 B (0%)
website/build/docs/markdown-features/code-blocks.html 223 kB +13 B (+0.01%)
website/build/docs/markdown-features/diagrams.html 62 kB 0 B
website/build/docs/markdown-features/head-metadata.html 51.6 kB +1 B (0%)
website/build/docs/markdown-features/links.html 41.5 kB +6 B (+0.01%)
website/build/docs/markdown-features/math-equations.html 92.8 kB +1 B (0%)
website/build/docs/markdown-features/plugins.html 96.9 kB +1 B (0%)
website/build/docs/markdown-features/react.html 132 kB 0 B
website/build/docs/markdown-features/tabs.html 141 kB +1 B (0%)
website/build/docs/markdown-features/toc.html 88 kB +1 B (0%)
website/build/docs/migration.html 40.3 kB +1 B (0%)
website/build/docs/migration/v2.html 40 kB +1 B (0%)
website/build/docs/migration/v2/automated.html 40.7 kB +1 B (0%)
website/build/docs/migration/v2/manual.html 192 kB +1 B (0%)
website/build/docs/migration/v2/translated-sites.html 51.4 kB +1 B (0%)
website/build/docs/migration/v2/versioned-sites.html 61 kB +1 B (0%)
website/build/docs/migration/v3.html 193 kB 0 B
website/build/docs/playground.html 32.1 kB 0 B
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 125 kB +1 B (0%)
website/build/docs/seo.html 89.1 kB 0 B
website/build/docs/sidebar.html 141 kB 0 B
website/build/docs/sidebar/autogenerated.html 148 kB +1 B (0%)
website/build/docs/sidebar/items.html 177 kB +1 B (0%)
website/build/docs/sidebar/multiple-sidebars.html 62.9 kB +1 B (0%)
website/build/docs/static-assets.html 55.2 kB 0 B
website/build/docs/styling-layout.html 142 kB 0 B
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 113 kB +1 B (0%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 67.4 kB 0 B
website/build/docs/using-plugins.html 107 kB 0 B
website/build/docs/versioning.html 93.4 kB 0 B
website/build/index.html 37.1 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_SLOWER

slorber and others added 2 commits October 16, 2026 11:56
…assisted)

SVGO minifies the ids of each SVG file independently, so inline SVGs of
the same page end up sharing ids like "a" and render with each other's
gradients, masks or clip paths.

The default SVGO config now also enables the `prefixIds` plugin, with a
short hash of the site-relative SVG file path as prefix. Class names are
not prefixed.

Breaking change: ids inside inline SVGs are now prefixed. Only SVGs that
contain a `<style>` or `<script>` element kept their original ids before.
The plugin docs explain how to restore the v3 SVGO config.

Fix #8297

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… references (AI-assisted)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@slorber
slorber force-pushed the claude/svgr-prefix-ids branch from 0658a76 to a1e0382 Compare October 16, 2026 09:56
@slorber
slorber merged commit 06b7eb1 into main Oct 16, 2026
42 checks passed
@slorber
slorber deleted the claude/svgr-prefix-ids branch October 16, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Argos Add this label to run UI visual regression tests. See argos.yml GH action. CLA Signed Signed Facebook CLA pr: breaking change Existing sites may not build successfully in the new version. Description contains more details.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple inline SVGs on a page can clash

1 participant