Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
webpack-visualizer-plugin
Advanced tools
Visualize and analyze your Webpack bundle to see which modules are taking up space and which might be duplicates.
The webpack-visualizer-plugin is a tool that helps developers visualize the size of their webpack output files with an interactive treemap. This visualization aids in understanding the composition of the bundle and identifying areas for optimization.
Generate Bundle Visualization
This feature allows you to generate an HTML file that visualizes the size of your webpack output files. By including the Visualizer plugin in your webpack configuration, you can produce a statistics.html file that provides a treemap visualization of your bundle.
const Visualizer = require('webpack-visualizer-plugin');
module.exports = {
plugins: [
new Visualizer({
filename: './statistics.html'
})
]
};
webpack-bundle-analyzer is a similar tool that provides a visual representation of your webpack bundles. It offers an interactive zoomable treemap visualization of the contents of your bundle, similar to webpack-visualizer-plugin. However, webpack-bundle-analyzer provides more detailed insights and options, such as the ability to view the bundle content in a sunburst or network graph format, and it can be run as a standalone server.
source-map-explorer analyzes JavaScript bundles using source maps to determine which file each byte in your minified code came from. It provides a visualization similar to webpack-visualizer-plugin but focuses more on the source map data to help identify large dependencies and optimize bundle size. Unlike webpack-visualizer-plugin, it is not limited to webpack and can be used with any JavaScript bundle that has a source map.
Visualize and analyze your Webpack bundle to see which modules are taking up space and which might be duplicates.
This tool is still pretty new, so please submit issues or feature requests!
Upload your stats JSON file to the site: chrisbateman.github.io/webpack-visualizer/
npm install webpack-visualizer-plugin
var Visualizer = require('webpack-visualizer-plugin');
//...
plugins: [new Visualizer()],
//...
This will output a file named stats.html
in your output directory. You can modify the name/location by passing a filename
parameter into the constructor.
FAQs
Visualize and analyze your Webpack bundle to see which modules are taking up space and which might be duplicates.
The npm package webpack-visualizer-plugin receives a total of 116,028 weekly downloads. As such, webpack-visualizer-plugin popularity was classified as popular.
We found that webpack-visualizer-plugin demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.