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

heap-sampling-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heap-sampling-webpack-plugin

Webpack provides a really detailed `webpack.debug.ProfilingPlugin`, but it only does CPU Profiling. There are more to performance tuning with Webpack than CPU profile. This plugin provides heap sample information to show where memory is allocated after a

  • 1.2.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
175
increased by5.42%
Maintainers
1
Weekly downloads
 
Created
Source

Heap Sampling Webpack Plugin

Webpack provides a really detailed webpack.debug.ProfilingPlugin, but it only does CPU Profiling. There are more to performance tuning with Webpack than CPU profile. This plugin provides heap sample information to show where memory is allocated after a successful build. The method used is through the Inspector session's HeapProfiler.startSampling. This is a sampling profiler, therefore, it CAN be used in production builds to check your memory consumption in your build machines.

The generated file has a .heapprofile extension and can be opened in the "Memory" tab under a Chromium based devtool to show what is taking up all that memory in your webpack run.

How to configure

Plug this into your webpack configuration like so:

const HeapSamplingPlugin = require("heap-sampling-webpack-plugin");

module.exports = {
  plugins: [
    new HeapSamplingPlugin();
  ]
}

You may want to specify an option with this plugin:

new HeapSamplingPlugin({
  outputPath: "/some/place/my.heapprofile"
})

FAQs

Package last updated on 03 Nov 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