Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

webpack-graph

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-graph

Converts JSON stats from webpack to a nice SVG-Image.

npmnpm
Version
0.1.2
Version published
Weekly downloads
10
-9.09%
Maintainers
1
Weekly downloads
 
Created
Source

webpack-graph

It visualize your dependency tree as svg image.

Provide it with webpack stats (as JSON) for version > 0.7.

You can generate them by calling webpack with --json.

Command Line

webpack-graph [<stats.json> [<output.svg>]]

If you don't provide the files as parameters webpack-graph will read them from stdin or write it to stdout.

--context <path> - Shorten filenames according to this context

--width <number> - The max width of the output svg

--height <number> - The max height of the output svg

--steps <number> - Limit the simulation steps

--interactive - Emit simulation code to browser

Resulting Image

  • Circles are modules/contexts
  • The size visualize the file size.
  • The color visualize the chunks in which the module is emitted.
  • Connections are dependencies
  • webpack-graph try to guess libaries and connect them with thin lines
  • Dashed lines visualize async requires.
  • Hover modules/contexts to display more info
  • Tooltip display module name and loaders
  • Tooltip display chunks
  • Green lines display requires from other modules/contexts
  • Red lines display requires to other modules/contexts
  • Brown lines display requires to and from other modules/contexts

Example

webpack-graph

Interactive version

See more examples in webpack examples

FAQs

Package last updated on 10 Oct 2012

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