ant design pro-level routing project realization dynamic load demand loading

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,
      },
  ],
};

Guess you like

Origin www.cnblogs.com/cckui/p/12180347.html