Load lazy sizes from row to reduce usingComponent

This commit is contained in:
Sam Carlton 2021-05-08 17:55:31 -05:00
parent 2c3e0ab688
commit d68e5a1f56
2 changed files with 5 additions and 2 deletions

View file

@ -16,7 +16,7 @@ export default async function ( video, options = {} ) {
} = options
// Setup inline lazysizes
await this.usingComponent( 'node_modules/lazysizes/lazysizes.min.js' )
// await this.usingComponent( 'node_modules/lazysizes/lazysizes.min.js' )
// console.log('video', video)

View file

@ -23,9 +23,12 @@ export default async function ( videos, options = {} ) {
const uid = Math.random().toString(36).substr(2, 9)
const rowId = `row-${ uid }`
// Setup inline lazysizes
// Setup inline scroll script
await this.usingComponent( 'helpers/scroll.js' )
// Setup inline lazysizes
await this.usingComponent( 'node_modules/lazysizes/lazysizes.min.js' )
// console.log('video', video)
const renderedCards = await Promise.all(videos.map( async video => {