Skip to content

[Feature]: Support clean distPath of DTS before build #139

@Timeless0911

Description

@Timeless0911

What problem does this feature solve?

For js outputs, Rsbuild will automatically clean distPath, see more details https://rsbuild.dev/config/output/clean-dist-path#outputcleandistpath

And for DTS outputs, we should also support to control the behaviour of clean DTS distPath after below code:

options.distPath = options.distPath ?? config.output?.distPath?.root;

The default value of clean should directly read from output.cleanDistPath

  • if it is false value, do not remove DTS distPath
  • otherwise, just remove DTS distPath

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions