Now how to achieve require.ensure


#1

Now how to achieve require.ensure([], (require)?
https://github.com/ReactTraining/react-router/blob/master/docs/guides/DynamicRouting.md

meteor-webpack id Outdated and not updated.

const rootRoute = {
component: “div”,
childRoutes: [ {
path: ‘/’,
component: require(’./components/App’),
indexRoute: {
getComponent(nextState, cb) {
require.ensure([], (require) => {
cb(null, {
nav:require(’./routes/Quans/components/QuanNav.jsx’),
header:require(’./routes/Quans/components/QuanHeader.jsx’),
content:require(’./routes/Quans/components/QuanIndex.jsx’),
panel:require(’./routes/Quans/components/QuanPanel.jsx’)
})
})
}
},
childRoutes: [
require(’./routes/Quans’),
require(’./routes/NotFound’)
],
}]
}