Us js file in a theme already use by a module I need to use in my theme a js file used originally by a other module: View slideshow.

View Slideshow take the jquery plugin Cycle from the libraries folder, on the root of the App, something like

libraries/js/cycle/jquery.cycle.js.


Now i need to use the jquery plugin Cycle in my theme, but drupal put it after my main theme js file

&lt;script src=mytheme.js&gt;  
&lt;script src=....cycle.js&gt;  


So it can't use it, because cycle must be before.

I add the file in my libraries.yml file like this:

mytheme
  js :
    - ...cycle.js: {}
    - mytheme.js: {}


but cycle steel remain after.
How could i move Cycle on top ?
Okay this was easy...
I realise that the js file is in the library views_slideshow_cycle/jquery_cycle, created by the module.

So i just have to add it has a dependencies to my theme

mytheme
   dependencies : 
     views_slideshow_cycle/jquery_cycle.