Code splitting with reify


#1

In the reify package readme, there is a link to a justification for nested imports, and in there is a section on using async functions and routers as a way to enable “automatic code splitting”.

Is that implemented in Meteor and reify yet?


#2

It looks like not, and maybe it’s better to ask for (or wait for) http/2 support with individual module loading anyway. :slight_smile:


#3

Not yet implemented, but that’s definitely the vision. Sorry for the wait.


UI lazy loading useless in Single Page Application
#4

No need to apologize, this stuff is coming along nicely!


#5

Any chance for splitting or http/2 (which would seem to obviate the need for code splitting and bundling) in Meteor 1.5?


#6

With the focus of 1.5 being on Meteor + Apollo integration, code splitting (or HTTP/2 support) might be held up for a bit. MDG should be releasing an updated Roadmap shortly, so we’ll soon see.

That being said, HTTP/2 support has been discussed and is logged as a feature request here:


#7

Awesome.

I just read up a bit on HTTP/2 as I wasn’t entire sure how it works. It looks like much of the reify work is still needed to determine which assets to “push” based on routes and whatnot, so a lot of the work may overlap. At least based on a pretty quick look at it.

I suppose in the end it doesn’t really matter whether files are bundled or pushed over HTTP/2 (and Meteor could theoretically select which method to use) - the end result is the same, and what I’m really after is just faster loading pages - in this case through smaller payloads. I have an app now that is essentially 4 different apps - and the bundle is getting pretty large. Most users will never need all the Admin stuff.