Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import 'lazysizes/plugins/respimg/ls.respimg';
import 'lazysizes/plugins/object-fit/ls.object-fit';
import 'lazysizes/plugins/parent-fit/ls.parent-fit';
/**
* configuration for lazysizes
*/
const stateClasses = {
lazyload: 'js-a-image--lazyload',
pending: 'state-a-image__image--pending',
loading: 'state-a-image__image--loading',
loaded: 'state-a-image__image--loaded',
};
Object.assign(lazySizes.cfg, {
preloadAfterLoad: false,
loadMode: 1,
expand: 10,
expFactor: 1.7,
lazyClass: stateClasses.lazyload,
preloadClass: stateClasses.pending,
loadingClass: stateClasses.loading,
loadedClass: stateClasses.loaded,
debug: true,
});
import __assign from 'core-js/features/object/assign';
Object.assign = Object.assign || __assign;
/**
* configuration for lazysizes
*/
enum States {
Lazyload = 'js-a-image--lazyload',
Pending = 'state-a-image__image--pending',
Loading = 'state-a-image__image--loading',
Loaded = 'state-a-image__image--loaded',
}
Object.assign(lazySizes.cfg, {
preloadAfterLoad: false,
loadMode: 1,
expand: 10,
expFactor: 1.7,
lazyClass: States.Lazyload,
preloadClass: States.Pending,
loadingClass: States.Loading,
loadedClass: States.Loaded,
debug: true,
});