memory-usage-webpack-plugin
v0.0.1
Published
A webpack plugin to measure memory usage during build
Maintainers
Readme
memory-usage-webpack-plugin
A webpack plugin to measure memory usage during the build process.
Installation
Install the plugin.
npm install memory-usage-webpack-plugin --save-devUsage
To use the plugin, add it to your webpack configuration:
const MemoryUsageWebpackPlugin = require('memory-usage-webpack-plugin');
module.exports = {
// ... other configurations
plugins: [
new MemoryUsageWebpackPlugin({
logTimeout: 1000, // 1 second
warningThreshold: 100 * 1024 * 1024, // 100 MB
}),
],
};Options
The plugin accepts the following options:
logTimeout(number): The interval in milliseconds to log memory usage. Default:1000(1 second).warningThreshold(number): The memory usage threshold in bytes to trigger a warning. Default:1 * 1024 * 1024 * 1024(1GB).
