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, })