How to import code (both client and server) and html dynamically in meteor in order to cut down the apps size


#1

Hi,
I am using blaze that comes with meteor. I am not using react as the react syntax is not as good as blaze’s. I am also using iron-router instead of flow-router. I want to import code (.js files) and html dynamically as I need it so that I cut down the size of the app as it first renders as well as make the first app render faster as not everything is downloaded to the client.
How do I do dynamic imports of files as I need them with blaze when using iron-router so I cut down the size of the app? Please give me an example.
If it can not be done in an app that uses iron-router how do I do the same in an app that uses flow-router? Please give me an example.
Do I need to dynamically import the server files? I don’t see the reason for this as the server methods are already being used as and when I need them through Meteor.call().