Set global variables in v5.7

I have an es6 javascript class with usefull functions to make develop faster, i have already export the class but when i import it in the app.js i cannot access in the other pages, here is something: when i import the js inside of the page, it works, but do i have to import it in every single page i will create? That is what im trying to avoid, so is there any solution for global variables in v5.7.

Im using f7 webpack and cordova

Framework7 use Template7.

You can try with “Global Context”

Yes, this is how ES modules work

yes, but is there a way to use that variable as global?

Can you be more specific when you talk abot “Global Context” y have the f7 instance with the context and i use it in different pages, but how can i use an es6 class as context?

This is how JavaScript works, if you want something accessible globally, assign it to window, e.g. = 'bar';