1. Use lazy route loading

Routing lazy load configuration:

Non-routing lazy load configuration:

Start without lazy loading, display blank, use lazy loading after the solution

2. Delete the map file from the compiled file.

Set productionSourceMap to false in config/index.js.

3. Use the CDN

1. Import in index.html

2. Modify/build/webpack. Base. Conf. Modify configuration in js. For the module. Exports add externals properties (see the webpack.docschina.org/configurati…). , where the key is referenced in the project and the value is the name of the referenced resource. For example, the global variable in elemental-UI is element

3. Delete the original import if the original import is not removed, the project will still import resources from node_modules. This means that the NPM run build will still pack the referenced resources together, making the generated file much larger. So I think it’s better to delete it.