Skip to content

Safelist & Caching

During dev/build, the integration scans

  • astro.config.mjs for icon classes
  • src/content/**/*.mdx? for:
    • Code block titles and languages
    • <FileTree> entries

It writes .starlight-icons/safelist.json in your project root.

  • The UnoCSS preset reads this safelist and adds classes to safelist.
  • Set SPI_SAFELIST_PATH env var to a JSON file of classes to force a safelist.