https://github.com/mischnic/har-build-analyzer
https://github.com/mischnic/har-build-analyzer
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mischnic/har-build-analyzer
- Owner: mischnic
- Created: 2022-09-12T12:20:07.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-12T13:16:50.000Z (over 3 years ago)
- Last Synced: 2025-01-26T07:12:39.504Z (12 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Perform analysis on a the JS bundles loaded in a specific page
## Usage
1. Copy and adjust `config.js` from the template.
2. Run a Webpack build (using the Webpack plugin in the comment in `har-resolved.js`) and a Parcel build (no additional config needed, the cache is read).
3. Load the same page using both builds and save the HAR file for each at the location specified in the config.
4. Run `har-resolver.js` first to generate the `foo.har.resolved` files (which list the bundles and their contained assets respectively).
5. Use `har-analyzer.js` for analysis, existing commands:
- `node har-analyzer.js additional`: list assets that are only bundled by Parcel
- `node har-analyzer.js duplicates`: list assets that are bundled (and loaded!) into multple bundles
- `node har-analyzer.js search `: search for a string in the loaded bundles
- `node har-analyzer.js overhead`: statistical analysis comparing (sum of raw asset sizes) and (individual bundle sizes)