Reputation: 5023
Is this possible to load script dynamically? for eg. I wish to reduce app weight. so I would like to load role based JS. I know its not best solution to reduce app weight but looking for interesting package or approach
Upvotes: 1
Views: 263
Reputation: 2010
There is no native support for dynamic/lazy loading in Meteor. There is an open request for it though:
https://github.com/MeteorCommunity/discussions/issues/27
And it is on their roadmap:
https://trello.com/c/24s6vyxo/55-incremental-loading
In the meantime there is a package that does help/address this via bundles:
https://github.com/numtel/meteor-lazy-bundles
Upvotes: 2