Head Script not rendering
I am trying to insert a HEAD script for SEO purposes.
However, nothing appears in the SSR page source, nor in the chrome dev tools for the page
11 Replies
helpful-purpleOP•4mo ago
I even tried: https://tanstack.com/router/latest/docs/framework/react/guide/document-head-management#managing-body-scripts
also not working
Document Head Management | TanStack Router React Docs
Document head management is the process of managing the head, title, meta, link, and script tags of a document and TanStack Router provides a robust way to manage the document head for full-stack appl...
exotic-emerald•4mo ago
can you share your root file?
helpful-purpleOP•4mo ago
OMG!!! In my file i had
script: [ ... ]
instead of scripts: []
!!!!!
Problem solvedexotic-emerald•4mo ago
Happy to be the rubber ducky! haha

like-gold•4mo ago
should that not have triggered a typescript error?
exotic-emerald•4mo ago
@Manuel Schiller I don't think we omitting the index signature for some reason
I'm taking a look at
exotic-emerald•4mo ago
Ok so I tried messing with the types and I can't figure it out best I can do for now is this (I looked into things like type-fest & super deep dive into stackoverflow) => https://github.com/TanStack/router/pull/4241
I also provided that vite doesn't enforce when using a function so probably a known TS thing though I can't seem to find it
GitHub
fix(router-core, start-client-core): Additional types to help with ...
This is an attempt to provide some feedback to the developer if they provide unexpected keys to the head property.
source: https://discord.com/channels/719702312431386674/1372533009563258880
FYI if...
like-gold•4mo ago
why is this necessary?
it already errors
like-gold•4mo ago


like-gold•4mo ago
ah but it does not error if one valid element is there
like-gold•4mo ago
