Vue-cli3 uses webpack bundle analyzer to analyze the size of dependency libraries

Time:2021-7-30

1、 Install webpack bundle analyzer

yarn add webpack-bundle-analyzer

Add the following configuration to the vue.config.js file

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

3、 Executeyarn serveCommand to run

Vue-cli3 uses webpack bundle analyzer to analyze the size of dependency libraries

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Recommended Today

VBS obtains the operating system and its version number

VBS obtains the operating system and its version number ? 1 2 3 4 5 6 7 8 9 10 11 12 ‘************************************** ‘*by r05e ‘* operating system and its version number ‘************************************** strComputer = “.” Set objWMIService = GetObject(“winmgmts:” _  & “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”) Set colOperatingSystems = objWMIService.ExecQuery _  (“Select * from […]