Closed andreyunugro closed 4 years ago
I wonder if it happens only when there are SSR errors. Did you have some Did not expect server HTML to contain a <div> in <main>
error in the console or similar?
I get the double head tags in the Vulcan Starter without having error in the console besides a warning about ComponentWillMount
.
We will need to replace react-helmet
by react-helmet-async
more broadly (https://github.com/staylor/react-helmet-async), maybe it would solve this issue.
@yannick-mayeur it's an interesting update and it could solve this issue, however it's rather difficult
The double heads seem to come from the _boilerplate_generator
in the Vulcan Starter there is one <head>
hard coded and one that seems to come from the dynamicHead
.
Just removing the hard coded one would solve the issue, but I don't know if the dynamicHead
always contains the head tag.
Normally yes but you can checkout the official documentation and explore the code to get a better understanding. If it seems to solve the issue you can open a PR anyway and we will check that more thoroughly.
I have done a PR on the Vulcan Starter repo: https://github.com/VulcanJS/Vulcan-Starter/pull/141
The _boilerplate_generator
also exists in this repo, but I am not sure if the behavior is similar to the one from the Vulcan-Starter.
Yes it's the same you can PR this one too I think. Vulcan is technically an app, though we barely actually run it. If you do "npm run start" on Vulcan you may notice the same issue. It would be better not to duplicate the code of course but _boilerplate_generator_
is totally internal to Meteor so we can't.
It would probably need testing both with SSR enabled (default) and disabled.
Fixed by #2485
Thank you very much!
Hi,
I am playing around with Vulcan and Vulcan Starter and I found that Vulcan Starter generate double head tags.
The head tags not related to browser, I tried firefox and chromium. I use clean Meteor, clean Vulcan (devel), and clean Vulcan Starter (devel), because I want to be able to use latest Vulcan version.
Please help. Thanks.