What is public/manifest.json file in create-react-

2019-03-11 16:08发布

I know that manifest.json uses for chrome extension, but here it is something other. It's file code:

{
  "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 change.

1条回答
唯我独甜
2楼-- · 2019-03-11 16:49

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.

From MDN (linked above):

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.

查看更多
登录 后发表回答