features
- Type: RsdoctorWebpackPluginFeatures | Array<keyof RsdoctorWebpackPluginFeatures> | 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: (lite mode will be deprecated in V2, refer to lite mode deprecation notice) lite mode. The difference between lite mode and normal mode is that source code information is no longer displayed, only packaged code information is displayed, so the code analyzed on the page will also be packaged. Default is normal mode.
Therefore, the default configuration enables Bundle analysis capabilities, Loader and Plugin build-time analysis. Resolver analysis capability is not enabled, and Rspack currently does not support Resolver analysis capabilities.
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:
- Enable lite mode.
- Increase the node memory limit, for example: NODE_OPTIONS=--max-old-space-size=8096.
- Reason: Because during the build process, source code information is cached, which exceeds memory, so enabling
litemode can help alleviate this. - Difference: The difference between
litemode and normal mode is that source code information is no longer cached, only packaged code information is cached, so the code analyzed on the page will also be packaged.
RsdoctorWebpackPluginFeatures
features type:
RsdoctorRspackPluginFeatures
features type:

