Code splitting with reify

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?

1 Like

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:

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

3 Likes

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

2 Likes

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

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:

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.

1 Like