Usually I can trigger UIkit functions from the console like:
UIkit.alert('.myalert').close();
I have this small example where I use UIkit and a dummy function. When compiling this i no longer have access over the console:
import UIkit from 'uikit';
import Icons from './uikit/uikit-icons';
UIkit.use(Icons);
import Myfunction from './myfunction';
document.addEventListener('DOMContentLoaded', () => {
Myfunction('something');
})
I added this to export UIkit with no luck:
export default { UIkit };
Add window.UIkit = UIkit
after import