Skip to content

[Bug]: Error "Module not found: Can't resolve" on relative url() in CSS using experiments.css #9993

@the-ge

Description

@the-ge

System Info

System:
  OS: Linux 6.12 Manjaro Linux
  CPU: (4) x64 Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz
  Memory: 7.59 GB / 15.53 GB
  Container: Yes
  Shell: 5.2.37 - /bin/bash
Binaries:
  Node: 22.14.0 - /run/user/1000/fnm_multishells/24639_1744367896220/bin/node
  npm: 10.9.2 - /run/user/1000/fnm_multishells/24639_1744367896220/bin/npm
npmPackages:
  @rspack/cli: ^1.3.3 => 1.3.4
  @rspack/core: ^1.3.3 => 1.3.4

Details

I provided two configs, one using CssExtractRspackPlugin and the other using the native CSS features (experiments: true). The first one runs successfully, while the second chokes on a relative URL in the CSS.

Image

Reproduce link

https://github.com/the-ge/rspack-css-relative

Reproduce Steps

  1. npm install
  2. npm run build

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions