I periodically try to optimize our Lighthouse page speed score and previously managed 90+ scores for all our pages. Since then, however, Shopify has introduced a ton of new JS/CSS files that load and seem to reduce all our page scores to the 60-70 level.
See e.g. the below screenshot of a number of JS files that are completely irrelevant to us (we e.g. do not use Prime, Google Pay, Rage Click and whatever all the other stuff is):
In addition, I could previously use a liquid script ala below to remove JS files from loading on e.g. my non-product pages - but this no longer seems to work, as if Shopify potentially removed the ability to capture the content header at all. Anyone who has found a work around?
{% capture h_content %}
{{ content_for_header }}
{% endcapture %}
{{ h_content | replace: '\/\/d1liekpayvooaz.cloudfront.net\/apps\/customizery\/customizery.js?shop=xyz.myshopify.com', ''}}
