Generate module dependencies graph, using the DOT language
npm install rollup-plugin-graphGenerates module dependencies graph, using the DOT language. To actually draw images, you will need the graphviz toolbox.
In your rollup.config.js:
``js
let graph = require("rollup-plugin-graph");
let graphOptions = {prune: true};
module.exports = {
/ ... /
plugins: [ graph(graphOptions) ]
};
`
In your terminal:
`sh`
rollup -c | dot -Tpng > graph.png
* prune (bool) Whether to prune the resulting graph, leaving only cyclic dependencies. This makes the graph strongly connected.exclude` (string or regexp) Specified the module ID pattern to be excluded from the graph.
Examples: pruned, not pruned
*