Best way to use module both in Dashboard and script? (component)

Hi,
I build modules one for GUI and one for code, anyway the code one I need sometimes when scripts are running - what’s your approach on that?
Are you importing the modules for the script environment?
Can initialize.ps1 be used to import the module to PSU? and if so, I guess that I don’t need to specify it in the environment.ps1 in every environment with the -Modules @(‘’)

But also what’s talking against the initialize.ps1 is that I’m guessing that’s for the integrated PS? Or is it also for the other PS version that you’re calling from the envirumetn.ps1?

As far as I know the components that are loaded in dashboards can’t be reached from the script section.

I guess that I’m not the only one with this “issue” so I’m wondering how the rest of you have solved it?

@adam