How to configure webpack vuecli3 report analyzes the map pack

First you need to install webpack-bundle-analyzer plugin

npm install webpack-bundle-analyzer --save-dev

Is then disposed in the config.js

module.exports = {
    chainWebpack: config => {
        config
            .plugin('webpack-bundle-analyzer')
            .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
    }

}

Run command

npm run serve

You can also run during packaging.

npm run build --report

 

effect:

localhost: 8888 is a fixed-port, local do not occupy normal visit

slightly. . . After a pop up window

 

 

Guess you like

Origin www.cnblogs.com/fqh123/p/12106673.html