Blaze and Module support import

Does It make sense to use import, when using atmosphere packages?
What happens to the code not incuded in the startup, can I load It on runtime and how?


It sounds like you’re referring to dynamic imports with atmosphere packages. If so, see here:


The main issue is that most packages still use eager loading for backwards compatibility.

For the packages you care about I’d recommend copying them into your packages/ folder and edit them to import-only and lazy-loading.

I’ve done this with a couple of packages which meant:

  • creating a exports.js file that imports all the required code and exports it.
  • removing api.addFiles calls
  • Adding an api.mainModule('exports.js', ['client', 'server'], { lazy: true });