examples: add favicon.ico for to avoid browser requests (#62511)

## What?

To avoid the default `favicon.ico` request by the browser, we are adding
a vercel `favicon.ico` to the project.
Currently, we handle exceptions for `favicon.ico` entering the Dynamic
Route `[lang]` in the following manner, but in this case, favicon.ico
renders the entire page.


[example:app-dir-i18n-routing](https://github.com/vercel/next.js/blob/canary/examples/app-dir-i18n-routing/get-dictionary.ts#L12)
```ts
export const getDictionary = async (locale: Locale) =>
  dictionaries[locale]?.() ?? dictionaries.en();
```


Instead of `favicon.ico`, the full HTML of the default language 'en' is
rendered.
![스크린샷 2024-02-26 오전 1 17
56](https://github.com/vercel/next.js/assets/59330828/ea46b75b-ae93-4db4-9b4b-db33fb5d5709)

In the correct case
![스크린샷 2024-02-26 오전 1 24
49](https://github.com/vercel/next.js/assets/59330828/7faabec1-1fc7-4330-a5c3-30449efcace6)

Fixes https://github.com/vercel/next.js/issues/46918

Co-authored-by: Sam Ko <sam@vercel.com>
This commit is contained in:
dongwon kim 2024-02-27 02:29:27 +09:00 committed by GitHub
parent 0d1b11fba3
commit e35ace6575
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB