-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.3][bug] Scripts (also in production) will be loaded at the top of body tag instead of head #6672
Comments
Thanks @abernix - currently I am also not sure how the dynamicHead works but I will try to figure out. Currently its not implemented in the docs of meteor. I will close this issue - thanks. |
I have to reopen it - because the dynamicHead is not doing what I need. The dynamicHead is still what I am using and its loaded to the head - but the generated scripts by meteor are not added to head anymore. So what I need is more something like a dynamicFooter so I can add scripts AFTER the meteor generated scripts. |
What happens if you use What happens if you wait until |
Or just put a file that loads whatever you want into your client JavaScript? $.getScript("http://my_lovely_script.js"); Unsure of the exact issue, so not sure what to offer. |
@abernix & @Primigenus thats absolutly true. Now we will do this by adding the script in our JS files after everything else got loaded. Its just sad that its not possible anymore by doing this with HTML like before - but thats okay. Have to change a few things and everything will work like before. |
Don't be too sad. The benefits from this change should be far outweigh the pain once they're all built out. 😺 |
For my dev-environment I modified the boilerplate-generator so all scripts are not appended into Advantage is the browser does not slow down when reloading with open dev-tools (less nodes to render). Any reason why we not implement this officially? Is there any disadvantage to placing script tags inside a div? |
@strikeout See meteor/meteor-feature-requests#24. The changes proposed in that feature request would allow you to place the scripts anywhere (using a tag like |
It seems that the new Meteor Version will load all scripts - also minified in production - at the top of the body tag. Because of this its difficult for me to add custom script tags in my head.html file because these scripts have to be loaded AFTER the meteor scripts are loaded.
< Meteor 1.3 this works fine.
My Situation is:
I need to add a Script inside the head tag (or where ever) from a extern CDN. But: This Script needs jQuery which is loaded in the body - so after my script was added. When I take a look at this file https://github.com/zol/meteor/blob/74055f410df7b12d49b343f943c4c37f21cad965/packages/boilerplate-generator/boilerplate_web.browser.html it seems that its impossible to load scripts AFTER Meteor generated the JS files. So in this situation I have to make a package out of every single script I need to be loaded after meteor generated the files.
Is there no other solution ?
The text was updated successfully, but these errors were encountered: