什么是create-react-app中的public/manifest.json文件? [英] What is public/manifest.json file in create-react-app?
问题描述
我知道chrome扩展使用'manifest.json`,但是在这里,它也被用作其他东西.
I know that chrome extensions use 'manifest.json`, but here, it is used as something else as well.
内容-
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "192x192",
"type": "image/png"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
当我更改某些值时,页面会更新,但没有任何变化.
When I change some value, page update, but nothing changes.
推荐答案
这是描述您的应用程序的Web App Manifest ,例如,移动电话(如果在主屏幕上添加了快捷方式).
It's a Web App Manifest that describes your application and it's used by e.g. mobile phones if a shortcut is added to the homescreen.
从MDN(上面链接):
From MDN (linked above):
Web应用程序清单在JSON文本文件中提供有关应用程序的信息(例如名称,作者,图标和描述).清单的目的是将Web应用程序安装到设备的主屏幕上,从而为用户提供更快的访问权限和更丰富的体验.
The web app manifest provides information about an application (such as name, author, icon, and description) in a JSON text file. The purpose of the manifest is to install web applications to the homescreen of a device, providing users with quicker access and a richer experience.
这篇关于什么是create-react-app中的public/manifest.json文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!