Problem with F7 and vite

Hi all,

I am trying to use vite and ESM modules with Framework7. Can somebody please give me an example how can I use, for example, app.dialog.alert with this settings? Especially, I want to keep a series of handy routines in a separate utils.js file, and these routines call, again as an example, app.dialog.alert. I have seen Framework7 Custom Build | Framework7 Documentation, but was unable to use that with a separate file, getting errors about F7 already initialized when I tried to export default app; from the main JS file.

TIA!

in your main app.js file, assign f7 instance to window object, e.g.

var app = new Framework7({
...
});

window.f7 = app;

And it will be available everywhere as window.f7