Skip to content

[Bug]: should not append a trailing / when output.assetPrefix is empty string #3616

@chenyuan-new

Description

@chenyuan-new

Version

latest

Details

When set output.assetPrefix to '', the output publicPath starts with /.
Maybe it'll be better not to append a trailing / when assetPrefix is ''

Why would i set assetPrefix to '':

  • i want to set output.publicPath so in rsbuild i should set assetPrefix
  • Our project use <base> element to determine the soure path of js file, the href value is dynamically set when start docker

The source code related to this issue:
related code

Reproduce link

no

Reproduce Steps

no

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions