Vite 中文文档 Vite 中文文档
指南
GitHub (opens new window)
指南
GitHub (opens new window)
  • vite

    • 指引
    • 为什么选 Vite
    • 开始
    • 功能
    • 命令行界面
    • 使用插件
    • 依赖预构建
    • 静态资源处理
    • 构建生产版本
    • 部署静态站点
    • 环境变量和模式
    • 服务端渲染
    • 后端集成
    • 与其他工具比较
    • 故障排除
    • 从 v3 迁移
  • API

  • 配置参考

  • vite

  • API

  • 配置参考

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 :

  1. ``` js
  2. let graph = require("rollup-plugin-graph");
  3. let graphOptions = {prune: true};

  4. module.exports = {
  5.     /* ... */
  6.     plugins: [ graph(graphOptions) ]
  7. };
  8. ```

In your terminal:

  1. ``` shell
  2. rollup -c | dot -Tpng > graph.png
  3. ```

Options


prune (bool) Whether to prune the resulting graph, leaving only cyclic dependencies. This makes the graph strongly connected. Examples: pruned, not pruned
exclude (string or regexp) Specified the module ID pattern to be excluded from the graph.

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.
Last Updated: 2023-07-25 08:42:01