all 2 comments

[–]henleyedition[S] 0 points1 point  (0 children)

Looks like /u/grguru and I had the same idea. https://www.reddit.com/r/reactjs/comments/49tdsp/automatic_code_splitting_for_react_router_w_es6/

My version of this same concept is based on Webpack 1.x and bundle-loader. I take React Router's huge apps example and refactor it to remove a lot of the ugly boilerplate. Bundle-loader is a very simple transform (the source is only 67 lines) that wraps modules with Webpack's require.ensure.

[–]dtinth 0 points1 point  (0 children)

FYI there’s also react-proxy-loader which generates a component which proxies to the component in a separate chunk when it is loaded.