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
rsdoctor-report.htmlin the report output directory. This directory defaults to the build output directory and can be configured via reportDir. All build analysis data is embedded in this standalone HTML file, which can be opened directly in a browser. See mode: 'brief' for more options.
output.mode does not support lite. Use output.reportCodeType to control whether source and asset code is included. The features lite configurations remain supported.
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 torsdoctor-report.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" - Rsdoctor 2.x accepts only the string values listed above.
- 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
Removed in Rsdoctor 2.x and ignored. Use output.mode: 'brief' and set output.options.type to ['json'] instead. Refer to compressData configuration migration.

