Incremental
Whether to enable incremental build, which significantly speeds up rebuilds and HMR by only rebuilding the changed parts.
- Type:
boolean | 'none' | 'safe' | 'advance' | 'advance-silent' | Incremental - Default:
'advance-silent'
Two configuration ways are provided:
-
Presets: including
boolean | 'none' | 'safe' | 'advance' | 'advance-silent'false | 'none': Disable incremental, and it will not be enabled for any stage.'safe': Enable incremental formakeandemitAssetsstages.true | 'advance-silent': Enable incremental for all stages to maximize performance for rebuilds and HMR. This is the default behavior of Rspack.'advance': The same as above, but it will detect cases that are unfriendly to incremental and throw warnings to users (e.g., incorrect configurations). This option can help you to identify potential issues affecting incremental build performance.
-
Detailed object configuration:
Incremental, which allows fine-grained control over whether the incremental is enabled for each stage.Detailed type of
Incremental
Usually, we recommend configuring in the preset way, and the detailed object configuration is only provided to facilitate bug troubleshooting.
Incremental only improves the rebuild performance and have no impact on the initial build. However, when persistent cache is available, initial builds are also treated as rebuilds too, and can benefit from incremental for performance.
The table below shows the results of incremental in different scenarios:
Starting from v1.4.0, Rspack enables incremental builds using 'advance-silent' mode by default. In previous versions, it only activated incremental builds for the make and emitAssets phases by default with 'safe' mode.

