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]: CSS support regression #7358

Closed
elsassph opened this issue Jul 29, 2024 · 4 comments
Closed

[Bug]: CSS support regression #7358

elsassph opened this issue Jul 29, 2024 · 4 comments
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@elsassph
Copy link

elsassph commented Jul 29, 2024

System Info

  System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 538.23 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
    pnpm: 9.4.0 - ~/.nvm/versions/node/v18.17.1/bin/pnpm
    bun: 1.0.15 - ~/.bun/bin/bun
  Browsers:
    Chrome: 126.0.6478.183
    Safari: 17.5
  npmPackages:
    @rspack/cli: 1.0.0-beta.0 => 1.0.0-beta.0 
    @rspack/core: 1.0.0-beta.0 => 1.0.0-beta.0 

Details

Default CSS support doesn't seem to be working, neither by omitting a rule for CSS:

ERROR in ./src/main.css
  × Module parse failed:
  ╰─▶   × JavaScript parsing error: Expected ';', '}' or <eof>
         ╭─[1:1]
       1 │ body {
         ·      ─
       2 │   font-family: Arial, Helvetica, sans-serif;
       3 │   font-size: 20px;
         ╰────

or when setting a default rule with css/auto type:

ERROR in ./src/index.ts
  × No parser registered for 'css/auto'

Reproduce link

https://github.com/elsassph/test-rspack-compat

Reproduce Steps

pnpm run rbuild
@elsassph elsassph added bug Something isn't working pending triage The issue/PR is currently untouched. labels Jul 29, 2024
@hardfist
Copy link
Contributor

try set experiments.css=true

@chenjiahan
Copy link
Member

@elsassph
Copy link
Author

Ugh I guess the note on https://rspack.dev/guide/tech/css wasn't obvious enough...

@chenjiahan
Copy link
Member

chenjiahan commented Jul 30, 2024

Yeah, we should improve the guide, I will update it

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

3 participants