Title of page not updating

So the thing is that I use SolidStart with CSR mode (w/index.html so vite-plugin-pwa detects it) On development, Title is working. On production, it doesn't. It always keep the index.html title and never updates it, probably because when looking at the DevTools, I can see 2 <title> elements - the one from my index.html and the one from SolidStart. Any work around?
8 Replies
Alex Lohr
Alex Lohr2y ago
Are you using a <title> in Solid Start? That should be a <Title> if there already is one in index.html, I suppose.
Vexcited
VexcitedOP2y ago
nope im using the one exported by solid-start
Alex Lohr
Alex Lohr2y ago
That's strange. Then two title tags getting rendered is definitely an error.
Vexcited
VexcitedOP2y ago
when removing the title tag from my index.html, it works but is it bad for SEO?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Vexcited
VexcitedOP2y ago
i also had some issues with meta without solid-start with the exact same conditions, title in index.html and Title in JSX are conflicting
mdynnl
mdynnl2y ago
(reposting deleted reply ^_^) looking at the source https://github.com/solidjs/solid-meta/blob/544aacc4ebaba89832e6e6aa91fc11bafca3a0a1/src/index.tsx#L36-L40 it removes all elements with data-sm attribute on the client with no hydration
Vexcited
VexcitedOP2y ago
so I should append data-sm to my title element to trick solid-meta? let me try and I'll let you know if it works! (will be on the pc soon) It works! Closing this...
Want results from more Discord servers?
Add your server