It would be amazing to have an async argument in modules. Maybe in meta.json?
I saw in the require_css function there is now an { async: true } argument and that would be helpful for a footer module’s css to load asynchronously, for example.
It would be amazing to have an async argument in modules. Maybe in meta.json?
I saw in the require_css function there is now an { async: true } argument and that would be helpful for a footer module’s css to load asynchronously, for example.
If we can simply get an option where you can set if you want to defer CSS and JS of the module, that would be great! This way we can simply tell each module what to do with the css.
A second step would be reading what module is just on the top XXX pixels of the page and defer everything else (with overwrite option if nessesary) .
In most cases, if we want to improve page speed, we need to keep CSS and JS in separate files to access async and defer parameters. But, unfortunately, that forces us to miss out on the enormous value of keeping everything (HTML, CSS, JS) organized in the module.
This is critical to be ‘compliant’ with Google’s Core Web Vitals.
Agreed on this being critical to Google’s Core Web Vitals. I’m in the process of preparing a client’s new site for launch soon and am noticing this exact limitation. I tried a hacky approach that seemed to pass the Core Vital test that was failing, but is FAR from adequate:
As I mentioned, I got around the test that was failing, but I’ve had to fallback on on terrible web development practices to do so. I’m hoping Hubspot can add this quickly.
we urgently need this function. google page speed is only at 86. there is still a little more to go up ![]()
Hi,
This option is available via the meta.json for the module. See Configuring a module - HubSpot docs
Thanks,
Matt
Thank you for adding this option.