Ben is on a roll (asynchronous imports/code splitting)

IMO and if I understood this feature correctly, a good first use case would be using it with react router to dynamically load components and develop some best practices around this, that should not be hard to refactor and many existing app would see an immediate gain in initial page load.

1 Like

In a case a router (f.eā€¦ vue-router) has support for Webpackā€™s require.ensure syntax for defining code splitting point. Is there a chance it can be used for Meteorā€™s code splitting too, or does it require separate feature from the router?

Also, what about CSS in modules? Will that work also for style-splitting?

They should switch to async import() which is a JavaScript standard, and is supported in Webpack 2, rather than a non-standard Webpack-specific API.

Yep!

1 Like

Iā€™m ashamed of one thing: I DONā€™T HAVE TIME TO TEST IT RIGHT NOW.

So neat, so so neat. Thank you MDG. Thank you a lot. Eager on having the opportunity to integrate this as soon as my schedule allows me to do so :thumbsup:

2 Likes

Thanks, I will open an issue there, if there isnā€™t one already.

1 Like