Hello Community! This is my first post, so please be soft on me 
We’ve recently started to transform our monolithic meteor application towards a modularised one, thus using meteor packages.
I want to manage all collections within a package (setup hooks, use denormalisation), say “core:collections”, and make our application-components use it. Moreover, I want to control which collections are exposed to 1) the client, 2) the server and 3) both. In a first version, I created three .js.-files (client, server, shared), defined the collections and used api.export in my package definition (in combination with api.addFiles) to expose the collections. This did work, however I no longer want to populate the global application scope that much, So I would like to use lazy loading instead. Thus, I defined api.mainModule for each of the js-files, and scoped them with either ‘client’, ‘server’ or [‘client’, ‘server’]. Unfortunately, these .mainModule-commands seem to overwrite each other, leading to certain collections not being exposed to the application. How can I fix that?
In short, is it possible to have something like this:
...
api.mainModule('clientAPIs.js', 'client', { lazy: true })
api.mainModule('serverAPIs.js', 'server', { lazy: true }) )
api.mainModule('sharedAPIs.js', ['server', 'client'], { lazy: true }) )
...
? It does not seem to work, but maybe I’m missing something? Shall I drive another approach?
Thank you for your help!