Implementing routing dynamically loaded class (code splitting), which may demand loading a specified demand.
Configuration items include:
- webpackChunkName, whether by webpackChunkName - achieve meaningful asynchronous file name
- loadingComponent, designated path when loading assembly
- level, demand loading of specified level routing
export default {
plugins: [
dynamicImport: {
loadingComponent: './components/PageLoading/index',
webpackChunkName: true,
level: 3,
},
],
};