Skip to content

Commit 05f7924

Browse files
Lewis Lloberaiansu
Lewis Llobera
authored andcommitted
Remove 'shortcut' link type before 'icon' (#7707)
1 parent 0dc69ec commit 05f7924

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

docusaurus/docs/using-the-public-folder.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If you put a file into the `public` folder, it will **not** be processed by Webp
2929
Inside `index.html`, you can use it like this:
3030

3131
```html
32-
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
32+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico">
3333
```
3434

3535
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.

packages/react-dev-utils/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = {
4444
template: path.resolve('public/index.html'),
4545
}),
4646
// Makes the public URL available as %PUBLIC_URL% in index.html, e.g.:
47-
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
47+
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
4848
new InterpolateHtmlPlugin(HtmlWebpackPlugin, {
4949
PUBLIC_URL: publicUrl,
5050
// You can pass any key-value pairs, this was just an example.

packages/react-scripts/config/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ module.exports = function(webpackEnv) {
598598
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),
599599
// Makes some environment variables available in index.html.
600600
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
601-
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
601+
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
602602
// In production, it will be an empty string unless you specify "homepage"
603603
// in `package.json`, in which case it will be the pathname of that URL.
604604
// In development, this will be an empty string.

packages/react-scripts/config/webpackDevServer.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module.exports = function(proxy, allowedHost) {
5151
// Instead, we establish a convention that only files in `public` directory
5252
// get served. Our build script will copy `public` into the `build` folder.
5353
// In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
54-
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
54+
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
5555
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
5656
// Note that we only recommend to use `public` folder as an escape hatch
5757
// for files like `favicon.ico`, `manifest.json`, and libraries that are

packages/react-scripts/fixtures/kitchensink/integration/env.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('Integration', () => {
5454
`${prefix}.`
5555
);
5656
expect(
57-
doc.querySelector('head link[rel="shortcut icon"]').getAttribute('href')
57+
doc.querySelector('head link[rel="icon"]').getAttribute('href')
5858
).toBe(`${prefix}/favicon.ico`);
5959
});
6060

packages/react-scripts/fixtures/kitchensink/public/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
6-
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
77
<title>React App</title>
88
</head>
99
<body>

packages/react-scripts/template-typescript/public/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta

packages/react-scripts/template/public/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta

0 commit comments

Comments
 (0)