Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-plugin-build-statistics

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-plugin-build-statistics

Webpack plugin for collecting statistics about your builds

  • 0.0.19
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Webpack build statistics plugin

Plugin that keeps a continuous log of your build time.

Use cases

  • Can be used as an evidence to show the business (PO's etc.) how slow build times impact the team and hinder productivity
  • By monitoring build time you can see if the optimizations in your Webpack config have really improved productivity
  • This plugin can help you to point out the differences between different machines e.g. if one of the developers has really slower builds than other it can be a sign of misconfiguration, poor hardware etc.

Installation and setup

To install the plugin run:

npm install --save-dev webpack-plugin-build-statistics

Add the plugin to your webpack.config and specify a project name.

const path = require('path');
const BuildStatisticsPlugin = require('webpack-plugin-build-statistics');

module.exports = {
    entry: './src/index.js',
    output: {
        filename: 'index.js',
        path: path.resolve(__dirname, 'dist'),
    },
    plugins: [
        new BuildStatisticsPlugin({ projectName: 'awesome-project' })
    ]
};

You are all set! 🚀

Now every time you make some changes the build time will be logged.

All logs will be summarized on daily basis and you can find the data under stats/build-summary.json file.

NOTE: You should probably gitignore the stats folder and all json files inside.

Logs analysis 📊

After a while you have collected some data and you are probably wondering how to process it and extract insights.

We've got you covered! Head over to our logs analyzer page and upload your build-summary.json file.

You can use this tool to visualize your build time and see the progress.

Did you find this plugin useful?

Show your support. Buy me a coffee. 😎

Buy Me A Coffee

Plugin options

This plugin is configurable and supports a few options.

Option nameRequiredDefault valueDescription
projectNameYesN/AName of your project. It will be saved in the log file. Useful when you have multiple projects.
logsDirectoryNameNostatsName of the directory where log files will be stored.
summaryLogFilenameNobuild-stats-summaryName of the json log file.

Read more about the inspiration for this plugin.

Keywords

FAQs

Package last updated on 03 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc