output
mode
V1.2.4 Added- Type:
"normal" | "brief"
Rsdoctor report mode, default is normal.
- normal: Generates a
.rsdoctorfolder in the build output directory, containing various data files and displaying code in the report page. The output directory can be configured via reportDir. - brief: Generates an HTML report file in the
.rsdoctorfolder of the build output directory. All build analysis data is integrated and injected into this HTML file, which can be opened in a browser to view the report. Brief mode has more configuration options, see brief for details.
Mode does not have a lite configuration option. The lite mode will be deprecated. Refer to lite mode deprecation notice.
options
V1.2.4 Added- Type:
BriefModeOptions | NormalModeOptions - Optional:
true - Default:
undefined - Description:
Based on different
modeconfigurations,optionssupports different configuration items:
mode: 'brief'
Brief mode is used to generate lightweight analysis reports, supporting both HTML and JSON output formats.
type: Output type, supports'html'and'json'arrays, allowing multiple formats to be selected simultaneously- If configured with
['html', 'json'], it will generate both an HTML file and a JSON file. - If configured with
['json'], it will generate a JSON file namedrsdoctor-data.json. - If configured with
['html'], it will generate an HTML file. The filename can be configured viahtmlOptions.reportHtmlName.
- If configured with
htmlOptions: HTML output related configurationreportHtmlName: HTML report filename, defaults toreport-rsdoctor.html
jsonOptions: JSON output related configurationfileName: JSON stats filename, defaults torsdoctor-data.jsonsections: Module configuration for JSON outputmoduleGraph: Whether to include module graph data, defaults totruechunkGraph: Whether to include Chunk graph data, defaults totruerules: Whether to include rules data, defaults totrue
Notes:
- In Brief mode, the
reportCodeTypeconfiguration item is invalid because only'noCode'is supported.
Configuration Example:
HTML vs JSON Output Format Differences
For viewing analysis reports in Playground, see Playground.
Configuration Example Comparison:
mode: 'normal'
In Normal mode, options is an empty object with no additional configuration items.
Type Definitions
BriefModeOptions
NormalModeOptions
NormalModeOptions currently has an empty Object type.
reportCodeType
- Type:
"noModuleSource" | "noAssetsAndModuleSource" | "noCode" | { noModuleSource?: boolean; noAssetsAndModuleSource?: boolean; noCode?: boolean }- In V2, only String type will be supported.
- Optional:
true - Default:
undefined, when undefined, outputs all complete data. - Description:
Select the scope of output analysis data:
- Default: Output all complete data
noModuleSource: Output data excluding module (Module) code. Module code refers to the packaged module code of individual files within the Bundle.noAssetsAndModuleSource: Output data excluding module (Module) code and Assets product codenoCode: Output data excluding code, i.e., no code is output
Output Data Comparison Table
Data output order from rich to simple: Default > noModuleSource > noAssetsAndModuleSource > noCode
For the explanation of Asset and Module, see Term.
- Example:
reportDir
- Type:
string - Optional:
true - Default:
undefined
The output directory for Rsdoctor reports. By default, it is the build output directory.
compressData
Deprecated in V2, please use output.mode: 'brief' and output.options.type: 'json' instead. Refer to compressData configuration migration.
- Type:
boolean - Optional:
true - Default:
true
compressData is used to configure whether to compress the analysis data under [outputDir]/.rsdoctor.

