PageSpeed ​​detecting theme.min.js as unused javascript

PageSpeed ​​detecting theme.min.js as unused javascript

Boliva
Shopify Partner
2 0 0
Hello guys!

I'm optimizing my template and I can't solve this problem, I just need to finish it.

Google's PageSpeed ​​says that my theme.min.js and my theme.css (shopify cdn) are not being used.

When trying to remove theme.min.js the store information is not loaded.

When trying to remove the theme.css the style sheet does not load and my entire site bug (I already tried with preload)

So if they are needed why aren't they being used?
Replies 2 (2)

OneCommerce
Shopify Partner
253 19 109

Hello mate,
We are OneExperts from OneCommerce - an eCommerce solution platform.

We give you some recommendations for theme.css and theme.min.js below:

Theme.css: You should make a critical CSS from theme.css, you can search how to make critical CSS on Google.
Theme.min.js: Open Coverage Tab like the image below: 

onecommerce_0-1672932734966.png

Find theme.min.js and click it

Code on Red Line are unused javascript file

Code on Blue Line are required to load on first screen, you just make a javascript file to load codes on Blue line and move theme.min.js to footer

onecommerce_1-1672932787650.png

Hope this can help you solve the problem.

If you need any further support, hit us up at julia@onecommerce.io for replies within minutes

OneCommerce - The Ultimate eCommerce Solution Platform
We offer 12+ solutions to help increase traffic, maximize conversion rates and generate better revenue for more than 500,000 eCommerce merchants worldwide.

Get know us at: Website | Blog | FAQ | Contact us

Boliva
Shopify Partner
2 0 0

Hello Julia, thanks for making a little of your time available, I've been checking about the critical css and I only found how to do it with NODE, would you have any idea how to do it for the shopify template model?