booleanundefinedWhether to clean up all files under the output directory before the build starts (the output directory defaults to dist).
By default, if the output directory is a subdir of the project root path, Rsbuild will automatically clean all files under the build directory.
When output.distPath.root is an external directory, or equals to the project root directory, cleanDistPath is not enabled by default, to avoid accidentally deleting files from other directories.
You can set cleanDistPath to true to force it to be enabled, or set it to false to force it to be disabled.
If you only need to clean files before the production build, but not before the development build, you can configure it as: