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')这样一句话就实现了按需加载,可以解释一下为什么吗,实在找不到资料
1 回答
慕无忌1623718
TA贡献1744条经验 获得超4个赞
添加回答
举报
0/150
提交
取消