Js issues in google lighthouse

Browser: Chrome (new)
OS: macOS / Windows / Linux / etc.
URL: this page

hello bricks team,

No plugins are active and only a few simple elements are used on the page, But there are always two js errors in Lighthouse.

Reduce unused JavaScript

and

Avoid serving legacy JavaScript to modern browsers

Hi @jolia,

I’ll move this to the Improvmene channel, I think it’s not a bug. And regarding those two JS errors, this is what Bricks loads. And especially because you don’t have many elements, there is more of unused JS code.
But, that JS code does not run, so it will not slow down your website, except few more kb to load.

Matej

1 Like

The “Reduce unused Javascript” is a constant issue for me, even with lots of elements on a page (although admittedly perhaps only from a dozen types).

This doesn’t happen with Breakdance, as an example. Hopefully this can be improved in Bricks soon.

2 Likes

Same here. Pretty frustrating that there’s no native way for Bricks to only load the JS which is actually being used on the page.

Without any plugins and on a blank page, the bricks.min.js file still loads at 36.6KB.

it is not a issue

thats just recommendation from lighthouse and this doesnt affect us to get 100 performance score as well

so its fine

Sure, but it can still be improved and there’s nothing wrong with wanting improvements. :slight_smile: This recommendation doesn’t pop-up with Breakdance for example, so it’s definitely possible to handle loading JS in a better way than is currently being handled by Bricks.

3 Likes