I’m using
“vite”: “^5.3.1”,
“react”: “^18.3.1”,
and
“react-helmet”: “^6.1.0”,
I’m using react helmet to render dynamic title like this
root.render(
<Suspense fallback="...">
<Helmet>
<title>myDynamicTitle()</title>
</Helmet>
<App/>
</Suspense>
);
Vite is using index.html without title tag in it.
When developing with the Vite server running title is there.
After running vite build
the dist/index.html does not contain title at all.
How can I take the dynamically injected title from react helmet and keep it dynamic in the html build by Vite?