Skip to content

[Bug]: Missing diagnostic information when using CssExtractRspackPlugin #11224

@Timeless0911

Description

@Timeless0911

System Info

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 3.19 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.10.0 - ~/Library/Caches/fnm_multishells/73858_1753849182684/bin/node
    npm: 10.9.0 - ~/Library/Caches/fnm_multishells/73858_1753849182684/bin/npm
    pnpm: 10.13.1 - ~/Library/Caches/fnm_multishells/73858_1753849182684/bin/pnpm
    bun: 1.1.30 - ~/.bun/bin/bun
  Browsers:
    Chrome: 138.0.7204.183
    Safari: 17.6
  npmPackages:
    @rspack/cli: ^1.4.10 => 1.4.10 
    @rspack/core: ^1.4.10 => 1.4.10 
    @rspack/plugin-react-refresh: ^1.4.3 => 1.4.3 

Details

When CssExtractRspackPlugin is enabled, if there exists some css syntax error:

  1. There are two error messages for the same error
  2. The former message lacks sufficient error information and error stack or code frame

This will result in a large number of meaningless error messages being output to the terminal if there are many CSS errors.

1.4.10

Image

Below is some behaviour in former version:

1.3.15

Image

1.2.8

Image

Reproduce link

https://github.com/Timeless0911/rspack-css-extract-diagnostics-issue

Reproduce Steps

  1. Run pnpm install
  2. Run pnpm dev

Metadata

Metadata

Assignees

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