Removing dependency to jQuery is great, but there’s still 40Kb of javascript loaded inconditionnally on frontend in /bricks/assets/js/bricks.min.js.
Each part of this file should only be included if needed.
For instance, even with Bricks lazyload disabled, the whole lazyload library is still loaded.
Same for sticky header, mobile menu, and a lot of other modules that we may not use at all.
A standard site with no fancy stuff should be almost 0kb of javascript, with maybe a few lines for mobile menu button and animation or stuff like that.
Besides, an option to inline all Bricks javascript would also be nice when it is small enough.
Yeah I know I’m a performance psycho
And Bricks perfs are really nice… with headroom to improve
Actually after adding a few other scripts like sliders or trackers or whatever, removing everything not used can help preserving the 100% on mobile.
Nothing really urgent, I admit.
Just tested. Swiper.min.js (135Kb) is loaded conditionally if you use the slider and only on the pages where slider is used.
I wonder if splide.min.js (28kb) or keen-slider.min.js (16Kb) can replace swiper. Have you considered those before @thomas ?
It’s good that the current slider js is loaded conditionally. We can avoid using the native slider element and load our preferred & small js slider library and profit with better performance. I will test between splide, keen-slider, glider and css only slider to see if they fit my requirements.