Global Import statements on the sites

Hey there!
I want to add the below in my Sites code, not on all pages, just in the Site Code

import {handleUserLogin} from 'public/advancedUserHandler';

And then I want to be able to use it in any page code like

let userLoggedIn = await handleUserLogin();

That would save time and also make it more stable to add global functions in that code. Is this possible already, it does not seem to work?