features
- Type: RsdoctorRspackPluginFeatures | Array<keyof RsdoctorRspackPluginFeatures>
- Optional:
true - Default:
['loader', 'plugins', 'bundle']
Configuration description
The features attribute is used for analysis feature toggles, and the specific functional items are as follows:
- loader: Loader time consumption and code compilation change analysis, enabled by default.
- plugins: Plugin calls and time consumption analysis, enabled by default.
- bundle: Build artifact analysis, enabled by default.
- resolver: Resolver analysis, disabled by default.
- lite: Enables lite mode. Both
features: { lite: true }andfeatures: ['lite']are supported. When enabled, lite mode forces the report code type tonoAssetsAndModuleSource, overriding otheroutput.reportCodeTypevalues. The only exception is an explicitly configurednoCodevalue, which takes precedence.noAssetsAndModuleSourceomits module source and asset code while retaining bundled module code. Lite mode is disabled by default.
Therefore, the default configuration enables Bundle analysis capabilities, Loader and Plugin build-time analysis. Resolver analysis is not enabled by default. To enable it, explicitly configure resolver in features.
Types
- If you set
featuresas an array type, the plugin will only enable the features you define in thefeaturesarray. - If you set
featuresas a simple object type, the plugin will only disable the features you set tofalsein thefeaturesobject.
Examples
Notes
Tip
If an "out of memory" error occurs, you can try the following:
- Set
output.reportCodeTypetonoCodeornoAssetsAndModuleSource. - Increase the node memory limit, for example: NODE_OPTIONS=--max-old-space-size=8096.
- Reason: The build may exceed the memory limit when it stores source code. Reducing the code data included in the report can lower memory usage.
- Difference:
noCodeomits all code, whilenoAssetsAndModuleSourceomits asset code and module source code.
RsdoctorRspackPluginFeatures
features type:

