$$ is not defined in imported js file

Hi I am using Framework7 Core latest version. I have imported an external js file like this in app.js file :
import ‘…/assets/common.js’;

in common.js file I have written :
$$(document).on(‘page:init’,’.page[data-name=“home”]’, function (e) {
alert(“ok”);
});

But it shows $$ is not defined. Same code work perfectly if I put it on app.js
What is the problem here? And what is best way to write code in latest version if I want dynamic page content?

Use import $$ from 'dom7' in modules where you use it