Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Rspack cssParser will parse failed when url(' ') #8788

Open
Tracked by #8445
GiveMe-A-Name opened this issue Dec 20, 2024 · 0 comments
Open
Tracked by #8445

[Bug]: Rspack cssParser will parse failed when url(' ') #8788

GiveMe-A-Name opened this issue Dec 20, 2024 · 0 comments
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@GiveMe-A-Name
Copy link
Member

System Info

System:
OS: macOS 13.6.5
CPU: (10) arm64 Apple M1 Pro
Memory: 87.03 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.9.0 - ~/Library/Application Support/fnm/node-versions/v22.12.0/installation/bin/npm
pnpm: 9.15.0 - ~/Library/pnpm/pnpm
bun: 1.0.21 - ~/.bun/bin/bun
Browsers:
Chrome: 131.0.6778.205
Safari: 16.6
npmPackages:
@rspack/cli: ^1.1.8 => 1.1.8
@rspack/core: ^1.1.8 => 1.1.8
@rspack/plugin-react-refresh: 1.0.0 => 1.0.0

Details

If i write url(' ') in css file.

.red {
  fg: green url('    ');
}

In webpack, it can compile success, but compile failed in rspack.

ERROR in ./src/style.css
  × Empty dependency: Expected a non-empty request
   ╭─[2:16]
 1 │ .red {
 2 │   fg: green url('    ');
   ·                 ──────
 3 │ }
   ╰────

The webpack will ignore the url if it;s

Reproduce link

https://github.com/GiveMe-A-Name/rspack-css-parser-test

Reproduce Steps

  1. pnpm install
  2. npm run start
  3. npm run start:webpack
@GiveMe-A-Name GiveMe-A-Name added bug Something isn't working pending triage The issue/PR is currently untouched. labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

1 participant