React-router: Any example of Lazy loading route components with Webpack's require.ensure?

Created on 10 Nov 2014  路  4Comments  路  Source: ReactTraining/react-router

First of all, great work there!

As Webpack provides require.ensure() for code-splitting, any idea how to use that with the react-router so that I can lazy load all the components of the routes?

Please help!

Most helpful comment

@djanosik
The example is for 0.13 and can still be found here: https://github.com/rackt/react-router/tree/v0.13.3/examples/partial-app-loading

All 4 comments

I have used this example for code splitting to lazy load with webpack
https://github.com/rackt/react-router/tree/master/examples/partial-app-loading

That's awesome Ajay! Thanks.

It seems the link is no longer working. Is there any other example?

@djanosik
The example is for 0.13 and can still be found here: https://github.com/rackt/react-router/tree/v0.13.3/examples/partial-app-loading

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrewpillar picture andrewpillar  路  3Comments

winkler1 picture winkler1  路  3Comments

tomatau picture tomatau  路  3Comments

misterwilliam picture misterwilliam  路  3Comments

maier-stefan picture maier-stefan  路  3Comments