Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@statoscope/webpack-model
Advanced tools
This package contains helpers to process webpack stats
@statoscope/webpack-model is a tool designed to help developers analyze and understand their Webpack bundle. It provides a model for Webpack stats that can be used to extract insights, generate reports, and optimize the bundle.
Load Webpack Stats
This feature allows you to load Webpack stats from a JSON file. The `readStats` function reads the stats file and returns a JavaScript object representing the stats.
const { readStats } = require('@statoscope/webpack-model');
const stats = readStats('path/to/webpack-stats.json');
console.log(stats);
Generate Reports
This feature allows you to generate a report from the Webpack stats. The `generateReport` function takes the stats object and returns a detailed report that can be used to analyze the bundle.
const { generateReport } = require('@statoscope/webpack-model');
const stats = readStats('path/to/webpack-stats.json');
const report = generateReport(stats);
console.log(report);
Compare Stats
This feature allows you to compare two sets of Webpack stats. The `compareStats` function takes two stats objects and returns a comparison report highlighting the differences between the two bundles.
const { compareStats } = require('@statoscope/webpack-model');
const stats1 = readStats('path/to/webpack-stats-1.json');
const stats2 = readStats('path/to/webpack-stats-2.json');
const comparison = compareStats(stats1, stats2);
console.log(comparison);
webpack-bundle-analyzer is a tool that provides an interactive visualization of your Webpack bundle. It helps you understand the size of your bundle and identify which modules are contributing to the size. Unlike @statoscope/webpack-model, it focuses more on visual representation and less on generating detailed reports.
source-map-explorer analyzes JavaScript bundles using source maps. It helps you understand which files and modules are contributing to the size of your bundle. Compared to @statoscope/webpack-model, it is more focused on source maps and less on providing a comprehensive model for Webpack stats.
webpack-stats-plugin is a Webpack plugin that generates a stats JSON file for your bundle. It is similar to @statoscope/webpack-model in that it provides stats, but it does not offer the same level of analysis and reporting capabilities.
FAQs
This package contains helpers to process webpack stats
We found that @statoscope/webpack-model demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.