For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/guide/usage/resolver.md.
close
  • 简体中文
  • Resolver 分析

    Tip

    Rspack 支持通过 features 开启 Resolver 分析能力;该能力默认关闭,如需启用,可以在 features 数组中添加 resolver,如下示例。features 配置

    new RsdoctorRspackPlugin({
      features: [
        'resolver',
        // ...other features
      ],
    });

    我们在 RsdoctorModule Resolve 中,可以看到当前 Rspack 项目中的所有源文件,通过点击某个文件可以查看该文件中引入的模块路径解析前后的路径对比解析耗时等信息,其内容如下图所示:

    名词释义

    页面中数据统计表格内的字段含义如下:

    名词描述说明
    Source Code代表导入模块语句的源码
    Duration代表解析路径的耗时
    Resolve Result代表 Source Code 被解析后的最终路径