logo
  • Guide
  • Config
  • Plugin
  • API
  • Examples
  • Community
  • Modern.js 2.x Docs
  • English
    • 简体中文
    • English
    • Commands
      File Conventions
      src/
      App.[tj]sx
      entry.[tj]s
      entry.server.[tj]sx
      modern.runtime.[tj]s
      routes/
      *.[server|node].[tj]sx
      api/
      lambda/*.[tj]s
      server/
      modern.server.[tj]s
      shared/
      config/
      html/
      favicon.*
      icon.*
      mock/
      public/
      upload/
      modern.config.[tj]s
      Runtime
      Core
      createRoot
      render
      Router
      router
      SSR
      NoSSR
      renderStreaming
      renderString
      createRequestHandler
      BFF
      useHonoContext
      Utility
      CSS-In-JS API
      Head
      loadable
      📝 Edit this page
      Previous pagefavicon.*Next pagemock/

      #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