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]: lightningcss color internal error #7789

Open
beliefgp opened this issue Sep 4, 2024 · 3 comments
Open

[Bug]: lightningcss color internal error #7789

beliefgp opened this issue Sep 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@beliefgp
Copy link

beliefgp commented Sep 4, 2024

System Info

System:
OS: macOS 14.5
CPU: (8) arm64 Apple M3
Memory: 16.00 GB
Binaries:
Node: 18.20.4
npm: 10.7.0
pnpm: 9.9.0
Browsers:
Chrome: 128.0.6613.114

Details

import 'pdfjs-dist/web/pdf_viewer.css';

lightningcss throw error when use pdf_viewer.css. webpack is ok.

Message: internal error: entered unreachable code
Location: index.crates.io-6f17d22bba15001f/lightningcss-1.0.0-alpha.58/src/values/color.rs:3225

Reproduce link

No response

Reproduce Steps

rsbuild build

@beliefgp beliefgp added bug Something isn't working pending triage The issue/PR is currently untouched. labels Sep 4, 2024
@JSerFeng JSerFeng self-assigned this Sep 4, 2024
@JSerFeng
Copy link
Collaborator

JSerFeng commented Sep 4, 2024

webpack is ok.

Did you use this loader ?

@JSerFeng
Copy link
Collaborator

JSerFeng commented Sep 4, 2024

Can you try add a targets config to it, I tried and compiled successfully, I'm not sure if this is a bug of lightningcss

@beliefgp
Copy link
Author

beliefgp commented Sep 6, 2024

i use rsbuild, enable lightningcss.

// rsbuiild.config.ts

import { defineConfig } from '@rsbuild/core';

export default defineConfig({
  source: {
    entry: {
      main: './src/index.ts'
    }
  }
});

// src/index.ts

import 'pdfjs-dist/web/pdf_viewer.css';

There are still error:
Message: internal error: entered unreachable code
Location: index.crates.io-6f17d22bba15001f/lightningcss-1.0.0-alpha.58/src/values/color.rs:3225

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

2 participants