import App from '../App'const startIndex = r => require.ensure([], () => r(require('../pages/start/startIndex')), 'startIndex')const second = r => require.ensure([], () => r(require('../pages/second/second')), 'second')export default [{ path: '/', component: App, children: [ { path: '/', name: 'startIndex', component: startIndex }, { path: '/second', name: 'second', component: second } ]}]const startIndex = r => require.ensure([], () => r(require('../pages/start/startIndex')), 'startIndex')這樣一句話就實現(xiàn)了按需加載,可以解釋一下為什么嗎,實在找不到資料
vue2.0的按需加載的一些疑問
慕森王
2019-02-14 18:19:49