Change order of Component JS and Global JS

Hi,

I’m having an issue with the order in which the Component JS and Global JS are injected onto the page. The Component JS is currently being injected before the Global JS, and I need to change this so that the Global JS loads first. I’m trying to set CSS variables globally and make them available for different components.

I’m wondering if you have any suggestions on how to do this.

1 Like

Hi @100leiden,

Unfortunately, it is not possible. Still, I will consult with our development team and let you know if anything is possible.

Thanks

Hi @tristup

Any news on this issue?

Hi @100leiden,

Regretfully, there is no news on this.

Thanks

There isn’t currently any sort of priority system for the JS currently. I can get that in our tracker. Look out for filters something like cs_page_js_priority and cs_component_js_priority. I would also just add a window.addEventListener("load", ...) to whatever should load last too.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.