Skip to content

This should make it clearer and more accurate in the case that PUBLIC_URL is blank. #1636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions packages/react-scripts/template/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tag above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Notice the use of the PUBLIC_URL variable in the tag above. It is
replaced with the URL of the `public` folder during the build. Only
files inside the `public` folder can be referenced from the HTML.

Unlike "/favicon.ico" or "favico.ico", "%PUBLIC_URL%/favicon.ico" will
Unlike "/favicon.ico" or "favicon.ico", the above link href path will
work correctly both with client-side routing and a non-root public URL.
(A natural exception to this is if PUBLIC_URL is defined as an empty
string.)

Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
Expand Down