galaxyproject / training-material

A collection of Galaxy-related training material
https://training.galaxyproject.org
MIT License
294 stars 842 forks source link

js bundle not loaded in devlopment #4897

Closed microfuge closed 2 weeks ago

microfuge commented 3 weeks ago

Hi,

Super minor issue.

I was trying out the gtn repo locally. When the jeklyll env is development the js bundle (main and theme) are not loaded but individual js files (e.g for jquery and bootstrap) are loaded with individual script tags. But I get jquery not available errors in firefox due to it being loaded after bootstrap. So the popups (e.g to expand tip boxes) don't work.
Setting jekyll env to production fixes this. Thanks!

hexylena commented 3 weeks ago

I will fix it. Apologies for the inconvenience

hexylena commented 3 weeks ago

I believe it is down to async defer, that on subsequent page loads the popups do seem to work. We set that to defer loading of non-critical javascript in production (popups aren't strictly necessary for most functionality) but there it works because all of the JS is bundled. However locally it is not, so async and defer lets the JS get loaded out of order causing issues with jquery.

hexylena commented 3 weeks ago

Should be fixed by https://github.com/galaxyproject/training-material/pull/4899