rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Bug]: Unable to exclude CSS files from LightningCssMinimizerRspackPlugin or to silence warnings

Open alex-vukov opened this issue 1 year ago • 0 comments

System Info

System: OS: Windows 11 10.0.22631 CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H Memory: 21.27 GB / 31.70 GB Binaries: Node: 20.11.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Chromium (127.0.2651.74) Internet Explorer: 11.0.22621.3527

Details

I have external CSS files in my application which come from other bundles and I don't want LightningCssMinimizerRspackPlugin to minimize them or to show warnings about them but I am unable to exclude them no matter what I try.

Reproduce link

https://github.com/alex-vukov/rspack-css-issue

Reproduce Steps

  1. Checkout the repo from the link.
  2. Run npm install.
  3. Run npm build and see this warning in the console: warn Compile Warning: ⚠ Invalid token in pseudo element: Dimension { has_sign: false, value: 2.0, int_value: Some(2), unit: "px" } at static\external-css\test.css:0:3274

The warning should not be there because the static\external-css folder is not included in the LightningCssMinimizerRspackPlugin's options in rsbuild.config.mjs. I tried to exclude the folder explixcitly and it still doesn't work and I see the same warning.

alex-vukov avatar Sep 20 '24 13:09 alex-vukov