From c9e1cee062c4452e64591b105475d797be23166a Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Thu, 19 Nov 2026 10:42:20 -0700 Subject: [PATCH] fix(create): avoid implicit missing favicon requests --- .changeset/explicit-empty-favicon.md | 5 +++++ .../react/project/base/src/routes/__root.tsx.ejs | 2 ++ .../solid/project/base/src/routes/__root.tsx.ejs | 10 ++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changeset/explicit-empty-favicon.md diff --git a/.changeset/explicit-empty-favicon.md b/.changeset/explicit-empty-favicon.md new file mode 100644 index 000000000..5626cfa3d --- /dev/null +++ b/.changeset/explicit-empty-favicon.md @@ -0,0 +1,5 @@ +--- +"@tanstack/create": patch +--- + +Declare an empty favicon in React and Solid Start scaffolds so browsers do not request a missing favicon.ico. diff --git a/packages/create/src/frameworks/react/project/base/src/routes/__root.tsx.ejs b/packages/create/src/frameworks/react/project/base/src/routes/__root.tsx.ejs index 824da9a6c..9648ba871 100644 --- a/packages/create/src/frameworks/react/project/base/src/routes/__root.tsx.ejs +++ b/packages/create/src/frameworks/react/project/base/src/routes/__root.tsx.ejs @@ -90,6 +90,7 @@ export const Route = <% if (hasContext) { %>createRootRouteWithContextcreateRootRouteWithContext ({ - links: [{ rel: "stylesheet", href: styleCss }], + links: [ + { rel: "icon", href: "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22/%3E" }, + { rel: "stylesheet", href: styleCss }, + ], }), shellComponent: RootComponent, }) @@ -87,7 +90,10 @@ import styleCss from "../styles.css?url"; export const Route = createRootRouteWithContext()({ head: () => ({ - links: [{ rel: "stylesheet", href: styleCss }], + links: [ + { rel: "icon", href: "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22/%3E" }, + { rel: "stylesheet", href: styleCss }, + ], }), shellComponent: RootComponent, })