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

speed-measure-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

speed-measure-webpack-plugin

Measure + analyse the speed of your webpack loaders and plugins

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
788K
increased by10.91%
Maintainers
1
Weekly downloads
 
Created

What is speed-measure-webpack-plugin?

The speed-measure-webpack-plugin (SMP) is a tool designed to measure the build speed of your webpack configuration. It helps developers identify bottlenecks in their build process by providing detailed timing information for each plugin and loader used in the webpack configuration.

What are speed-measure-webpack-plugin's main functionalities?

Measure Build Speed

This feature allows you to wrap your existing webpack configuration with SMP to measure the build speed. The `wrap` method is used to wrap the configuration, and SMP will then provide detailed timing information for each part of the build process.

const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
const smp = new SpeedMeasurePlugin();

module.exports = smp.wrap({
  // Your webpack configuration
  entry: './src/index.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist')
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: 'babel-loader'
      }
    ]
  },
  plugins: [
    // Your plugins
  ]
});

Detailed Timing Information

This feature allows you to customize the output format and target for the timing information. In this example, the `outputFormat` is set to 'human' for a more readable format, and the `outputTarget` is set to `console.log` to print the timing information to the console.

const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
const smp = new SpeedMeasurePlugin({
  outputFormat: 'human',
  outputTarget: console.log
});

module.exports = smp.wrap({
  // Your webpack configuration
  entry: './src/index.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist')
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: 'babel-loader'
      }
    ]
  },
  plugins: [
    // Your plugins
  ]
});

Other packages similar to speed-measure-webpack-plugin

FAQs

Package last updated on 28 Mar 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