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')
这样一句话就实现了按需加载,可以解释一下为什么吗,实在找不到资料
慕无忌1623718
相关分类