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?
Cheers
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?
Cheers
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:
exports.js
file that imports all the required code and exports it.api.addFiles
callsapi.mainModule('exports.js', ['client', 'server'], { lazy: true });