Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenotron/heap-sampling-webpack-plugin
https://github.com/kenotron/heap-sampling-webpack-plugin
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kenotron/heap-sampling-webpack-plugin
- Owner: kenotron
- Created: 2021-10-08T22:28:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-18T16:41:11.000Z (about 1 year ago)
- Last Synced: 2024-10-06T12:16:20.745Z (3 months ago)
- Language: TypeScript
- Size: 58.6 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.json
Awesome Lists containing this project
README
# 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:
```js
const HeapSamplingPlugin = require("heap-sampling-webpack-plugin");module.exports = {
plugins: [
new HeapSamplingPlugin();
]
}
```You may want to specify an option with this plugin:
```js
new HeapSamplingPlugin({
outputPath: "/some/place/my.heapprofile"
})
```