For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /apis/app/hooks/config/icon.md.

Apple Touch Icon

When there is an icon.* file in the config directory at the root of the project, Modern.js will automatically set the file to the html.appIcon configuration option for generating the Apple Touch Icon icon under the iOS system.

./config
└── icon.png

After the build is completed, you can see the following tags automatically generated in HTML:

<link rel="apple-touch-icon" sizes="180x180" href="/static/image/icon.png" />

Order

When setting up the app icon, Modern.js looks for files in the following order:

  • icon.png
  • icon.jpg
  • icon.jpeg
  • icon.svg
  • icon.ico