I didn’t find an answer anywhere so I posting what works for me.
Call the swiper instance inside a window.load.
jQuery:
var initializeBlock = function( $block ) {
$(window).load(function(){
$block.find('.product-slider').mySwiper();
});
};
The same principle can be used with vanilla using window.addEventListener('load')
.