Skip to content

How do I async load a component with AsyncRoute

PatrickJS edited this page Feb 25, 2016 · 2 revisions

{ path: '/about', loader: () => require('es6-promise!./about/about')('About') }

the es6-promise! will let webpack know that the file should return a function that returns a promise using es6-promise-loader. The function takes a namespace for the component. Also see es6-promise-loader