rspack icon indicating copy to clipboard operation
rspack copied to clipboard

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

Open the-ge opened this issue 1 year ago • 1 comments

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

the-ge avatar Apr 11 '25 10:04 the-ge

@the-ge Now rspack's exprement's css don't have the equivalence the url config of css-loader. I will make a PR to support bool first.

stormslowly avatar Apr 21 '25 10:04 stormslowly