Skip to content

[Bug]: rslib duplicates public folder contents by default; no option found to disable. Multiple libs cause public contents to be copied to sibling folders. #583

@superchenwb

Description

@superchenwb

Version

System:
    OS: Windows 11 10.0.26100
    CPU: (32) x64 Intel(R) Core(TM) i9-14900HX
    Memory: 7.51 GB / 31.73 GB
  Browsers:
    Edge: Chromium (130.0.2849.56)
  npmPackages:
    @rslib/core: ^0.1.5 => 0.1.5

Details

rslib will, by default, copy all the contents of the public folder, and there is no found way to disable this copying. Moreover, when there are multiple libs, it will copy all the contents of the public folder to a folder that is at the same level as the public folder.

This seems to be a behavior inherited from rsbuild.

But I don't need rslib to handle these files; they are not used anywhere in the code, yet I need to keep them.

Reproduce link

https://github.com/superchenwb/rslib-demo

Reproduce Steps

for example:

execute pnpm dev
find images folder in the root folders

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions