Skip to content

sirgalleto/memory-usage-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memory-usage-webpack-plugin

Work in progress

Plugin for generating insightful data about your Webpack runtime memory consumption.

The plugin watches for a rss memory consumption over a threshold, and when the memory is greater logs a .heapsnapshot that can be loaded in the chrome developer tools or heapviz.com

Install

npm i -D memory-usage-webpack-plugin

Usage

webpack.config.js
const MemoryUsageWebpackPlugin = require('memory-usage-webpack-plugin')

module.exports = {
  // webpackConfig,
  plugins: [
    // ...plugins,
    new MemoryUsageWebpackPlugin({ 
        // ...options
     })
  ]
}

Options

Param Type Default Description
threshold number 1024 Memory in mb when to save the first heapsnaptshot
tresholdIncrease number 100 Memory in mb to increase threshold after a threshold is reached
snaptshotOnKill boolean true Logs a heapsnaptshot when a kill -9 kills the process
snaptshotOnSignal boolean true Logs a heapsnaptshot when a kill -USR2 kills the process

About

Plugin for generating insightful data about your Webpack runtime memory consumption

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published