[Poi] Build and Analyze Your JavaScript Bundles with Poi

Posted Answer1215

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Poi] Build and Analyze Your JavaScript Bundles with Poi相关的知识,希望对你有一定的参考价值。

Ever wonder where those extra KB in your bundle are coming from? This lesson walks you through running Poi‘s build process. Then we‘ll add a bundle analyzer to find where you may be able to trim down on your file size.

 

Install:

npm i -D webpack-bundle-analyzer

 

Build project:

poi build

 

poi.config.js:

const BundleAnalyzer = require(‘webpack-bundle-analyzer‘).BundleAnalyzerPlugin;

module.exports = (options) => ({
    webpack(config) {
       

        if(options.analyze) {
             config.plugins.push(
                new BundleAnalyzer()
             )
         }


        return config;
    }       
})

 

Run with analyzer:

poi build --analyze

 

以上是关于[Poi] Build and Analyze Your JavaScript Bundles with Poi的主要内容,如果未能解决你的问题,请参考以下文章

Oracle LiveLabs实验:Load and Analyze Your Data with Autonomous Database

sh 用于解析Nginx访问日志的Bash脚本:https://sysadmins.co.za/bash-script-to-parse-and-analyze-nginx-access-logs/

[Poi] Use Poi to Build an Index.js with Modern JavaScript Features

IOS性能调优系列:Analyze静态分析

Apache POI – Reading and Writing Excel file in Java

P3455 [POI2007]ZAP-Queries