Bower install plugin of lazysizes

I installed lazysizes via bower running “bower install lazysizes --save” and everything was ok.

now I would like to add also an internal plugin of lazysizes.
I can see the “plugins” folder inside the “bower_components/lazysizes” folder, as you can see from here https://github.com/aFarkas/lazysizes

How can I include for example the “video-embed” plugin in my project?

is there a bower command to install also the plugins of a package or I have to do manually?

if yes, what are the steps that I have to follow?

Thanks for your support!

Try and add this to your bower.json:

"overrides": {
    "lazysizes": {
      "main": [
        "lazysizes.js",
        "lazysizes/plugins/video-embed/ls.video-embed.js"
      ]
    }
  }

thanks @Twansparant, unfortunately it seems doesn’t work.
I added this code to bower.json and run again gulp.
I checked the script (dist/scripts/main.js) and I can’t see the code of ls.video-embed.js

is there something else that I can try?
the path that you wrote seems correct

thanks

solved, there was a problem with the path.

this is correct:

  "overrides": {
     "lazysizes": {
          "main": [
              "lazysizes.js",
              "plugins/video-embed/ls.video-embed.js"
          ]
   }

}

1 Like