Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

source-map-explorer

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

source-map-explorer

Analyze and debug space usage through source maps

  • 2.5.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
685K
increased by3.39%
Maintainers
3
Weekly downloads
 
Created

What is source-map-explorer?

The source-map-explorer npm package is a tool that helps developers analyze and understand the composition of their JavaScript bundles. It visualizes the source map files to show which files and modules contribute to the final bundle size, making it easier to identify and optimize large dependencies.

What are source-map-explorer's main functionalities?

Analyze Bundle

This feature allows you to analyze a JavaScript bundle to see the composition of the bundle. The command `source-map-explorer bundle.js` will generate a visualization of the bundle, showing which files and modules are included and their sizes.

const { exec } = require('child_process');
exec('source-map-explorer bundle.js', (err, stdout, stderr) => {
  if (err) {
    console.error(`Error: ${stderr}`);
    return;
  }
  console.log(`Output: ${stdout}`);
});

Analyze Multiple Bundles

This feature allows you to analyze multiple JavaScript bundles at once. The command `source-map-explorer bundle1.js bundle2.js` will generate a visualization comparing the composition of the specified bundles.

const { exec } = require('child_process');
exec('source-map-explorer bundle1.js bundle2.js', (err, stdout, stderr) => {
  if (err) {
    console.error(`Error: ${stderr}`);
    return;
  }
  console.log(`Output: ${stdout}`);
});

Generate JSON Output

This feature allows you to generate a JSON output of the bundle analysis. The command `source-map-explorer --json bundle.js` will produce a JSON file containing detailed information about the bundle's composition.

const { exec } = require('child_process');
exec('source-map-explorer --json bundle.js', (err, stdout, stderr) => {
  if (err) {
    console.error(`Error: ${stderr}`);
    return;
  }
  console.log(`JSON Output: ${stdout}`);
});

Other packages similar to source-map-explorer

Keywords

FAQs

Package last updated on 26 Sep 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc