How i can do imports in F7(v5) app component?

Hello, I want to use the app component in a different component, but the object returns undefined.

this my app.js file :

import routes from ‘./routes.js’;
import App from ‘…/app.f7.html’;

var app = new Framework7({
root: ‘#app’,
component: App,
name: ‘Go’,
theme: ‘auto’,
routes: routes,

export default app;

the code in the html file I want to use

 import app from "./js/app.js";
console.log(app) => return undefined

in component:

const app = this.$app;

Hi shastox,

thanks for your reply.
but const app = this.$app; => return cannot read property ‘$app’ of undefined

change to = new Framework7({

and remove import app from "./js/app.js";

I made the changes you said but the result has not changed