Skip to content

[Bug]: rsbuild dev cleans the dist dir by default #4481

@jbms

Description

@jbms

Version

@rsbuild/core: ^1.1.9 => 1.2.3

Details

rsbuild dev defaults to not writing to the output directory, but still honors the cleanDistPath option (which defaults to true), causing it to clear the output directory.

Instead, rsbuild dev should only honor cleanDistPath if it is actually writing to the output directory. Otherwise, it should leave the output directory untouched.

Reproduce link

n/a

Reproduce Steps

  1. rsbuild build
  2. Observe that dist/ is populated
  3. rsbuild dev, then terminate it once it finishes building once
  4. Observe that dist/ is not cleared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions