undefined
Set the web application icons to display when added to the home screen of a mobile device:
icons
field.apple-touch-icon
and manifest
tags in the HTML file.Refer to the following documents for more information:
For display on different devices, you will need to prepare several icons of different sizes.
The most commonly used icon sizes are 192x192
and 512x512
, and you can customize the icon sizes and quantities to suit your needs.
After compilation, the following tags will be automatically generated in the HTML:
Here, manifest.webmanifest
is a JSON file that contains information about the application's name, icons, and other details.
For Chromium, you must provide at least a 192x192 pixel icon and a 512x512 pixel icon. If only those two icon sizes are provided, Chrome automatically scales the icons to fit the device. If you'd prefer to scale your own icons, and adjust them for pixel-perfection, provide icons in increments of 48dp
.
string
undefined
The name of the application that will be displayed when it is added to the home screen of the mobile device. If not set, the manifest.webmanifest
file will not be generated.
For more details, see Web app manifests - name.
AppIconItem[]
undefined
The list of icons:
src
is the path of the icon, which can be a URL, an absolute file path, or a relative path to the project root.size
is the size of the icon in pixels.target
refers to the intended target for the icon, which can be either apple-touch-icon
or web-app-manifest
. If target
is not set, by default, the manifest file will include all icons, while the apple-touch-icon
tags will only include icons smaller than 200x200
.src
can be set to an absolute path:
Use target
to specify the target for the icon:
string
'manifest.webmanifest'
The filename of the manifest file.