Home

Awesome

rollup-plugin-graph

Generates module dependencies graph, using the DOT language. To actually draw images, you will need the graphviz toolbox.

In your rollup.config.js:

let graph = require("rollup-plugin-graph");
let graphOptions = {prune: true};

module.exports = {
    /* ... */
    plugins: [ graph(graphOptions) ]
};

In your terminal:

rollup -c | dot -Tpng > graph.png

Options

Sample output

Please note that this plugin is not directly responsible for image rendering. It generates output in the DOT language, so you need to use a proper tool (such as Graphviz) to create the image.