Closed macrozone closed 7 years ago
Well I recall the orginator of Mantra saying, Mantra already caputes the efficientcies of lazy loading. I really miss this initiative. I've been playing around with internals a little. They're a few caveats that I'd love to hear more about; for instance, what othe usecases did they imagine for the module.load() feature. Is it acceptable to modify the context (in a pure way). to modify the context
true, i also thought about what to do with module.load. But i think lazy loading and module.load do not work well together at the moment, also because flow-router (and maybe react-router as well) do not support dynamic added routes.
however, the best way of using lazy loading is in the routes-action at the moment. So if a route is called, lazy load the component there.
adding lazy loaded stuff to the content would also be cool, but i think this might have little impact on loading performance (in comparison with component-trees)
for the upcoming meteor 1.5 we might need to move files in /imports to embrace lazy-loading.
solution would be a configurable modules-folder:
default: /client/modules custom: /imports/mantra-modules/ (example)
entry point would still be client/main.js