Skip to content

Commit

Permalink
Remove 'shortcut' link type before 'icon' (#7707)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewislbr authored and iansu committed Sep 20, 2019
1 parent 0dc69ec commit 05f7924
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docusaurus/docs/using-the-public-folder.md
Expand Up @@ -29,7 +29,7 @@ If you put a file into the `public` folder, it will **not** be processed by Webp
Inside `index.html`, you can use it like this:

```html
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<link rel="icon" href="%PUBLIC_URL%/favicon.ico">
```

Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-utils/README.md
Expand Up @@ -44,7 +44,7 @@ module.exports = {
template: path.resolve('public/index.html'),
}),
// Makes the public URL available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
new InterpolateHtmlPlugin(HtmlWebpackPlugin, {
PUBLIC_URL: publicUrl,
// You can pass any key-value pairs, this was just an example.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/config/webpack.config.js
Expand Up @@ -598,7 +598,7 @@ module.exports = function(webpackEnv) {
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
// In production, it will be an empty string unless you specify "homepage"
// in `package.json`, in which case it will be the pathname of that URL.
// In development, this will be an empty string.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/config/webpackDevServer.config.js
Expand Up @@ -51,7 +51,7 @@ module.exports = function(proxy, allowedHost) {
// Instead, we establish a convention that only files in `public` directory
// get served. Our build script will copy `public` into the `build` folder.
// In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
// Note that we only recommend to use `public` folder as an escape hatch
// for files like `favicon.ico`, `manifest.json`, and libraries that are
Expand Down
Expand Up @@ -54,7 +54,7 @@ describe('Integration', () => {
`${prefix}.`
);
expect(
doc.querySelector('head link[rel="shortcut icon"]').getAttribute('href')
doc.querySelector('head link[rel="icon"]').getAttribute('href')
).toBe(`${prefix}/favicon.ico`);
});

Expand Down
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<title>React App</title>
</head>
<body>
Expand Down
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/template/public/index.html
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand Down

0 comments on commit 05f7924

Please sign in to comment.