A Webpack plugin that adds heap sampling profiling to builds using Node.js Inspector HeapProfiler. It generates .heapprofile files openable in Chromium DevTools Memory tab. Version 1.2.2 is stable with no recent updates. Unlike CPU profiling (e.g., webpack.debug.ProfilingPlugin), this focuses on memory allocation, suitable for production builds to diagnose memory consumption in build machines. Configuration is minimal via Webpack plugin array.
npm install heap-sampling-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Shows basic Webpack configuration with HeapSamplingPlugin enabling heap profiling output to a file.
Ensure Node.js process has inspector access (--inspect flag not required, but runtime must support Inspector).
Use a unique filename per build (e.g., include timestamp in outputPath).
Test with your Webpack version; consider alternatives like webpack-bundle-analyzer for memory analysis.
Use only for diagnostic builds, not in CI pipeline for every commit.
Ensure you are using a standard Node.js runtime (not a stripped-down build) and that the process has inspector permissions.
Use require('heap-sampling-webpack-plugin') instead of import.Ensure outputPath directory exists and is writable. Use absolute path or ensure relative path is correct for Webpack context.
No dependency data recorded yet.