Skip to content

[Bug]: experiments.css introduces wrong path \ under Windows when using publicPath: 'auto' #9237

@SoonIter

Description

@SoonIter

System Info

@rspack/core 1.2.2

Details

actual behavior

dist/static/css/index.css
background: url(..\../static/svg/logo.svg)

expected behavior

dist/static/css/index.css
background: url(../../static/svg/logo.svg)

Reproduce link

https://github.com/SoonIter/rspack-css-extract-wrong-path/tree/css-experiments

Reproduce Steps

  1. pnpm i
  2. npm run build

Metadata

Metadata

Assignees

No one assigned

    Labels

    teamThe issue/pr is created by the member of Rspack.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions