Integrate a graphic kit in a weback

Hello,

I have a problem to integrate a graphical kit using UIKit and Plyrs with rails. Until now I was using directly the JS files provided, but I decided to create a pack and use yarn to get its 2 libraries (note: I’m a noob in frontend development).

So, in the browser I have an error :

Uncaught ReferenceError: UIkit is not defined
    at Object.theme_slideshow (config-theme.js:19)
    at Object.theme_init (config-theme.js:49)
    at HTMLDocument.<anonymous> (config-theme.js:56)

Corresponding to this line in my config-theme.js file:

const HomepageApp = {
    //----------- 1. uikit slideshow -----------
    theme_slideshow: function() {
        UIkit.slideshow('.in-slideshow', {   // <---- here UIKit is undefined
	// ...

My javascript/pack/wave.js looks like:

// Framework
import UIkit from "uikit/dist/js/uikit"
import Plyr from "plyr"

// Kit graphique
require("wave/indonez/loader")
// ...
require("wave/config-theme")

Has anyone encountered a similar problem ?

Ok found by putting this content in config-theme.js:

import UIkit from 'uikit';
import Icons from 'uikit/dist/js/uikit-icons';

UIkit.use(Icons);