- vue异步组件
- es6提案的import()
- webpack的require.ensure()
一、Vue异步组件技术:
{
path: '/home',
name: 'Home',
component: resolve => reqire(['path路径'], resolve)
}
二、es6提案的import()
const Home = () => import('path路径')
三、webpack提供的require.ensure()
{
path: '/home',
name: 'Home',
component: r => require.ensure([],() => r(require('path路径')), 'demo')
}