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

Linara babel transform fails when the class name contains 'css' #712

Closed
maciejmyslinski opened this issue Dec 4, 2020 · 1 comment
Closed
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: rollup 🗞️ Issue is related to rollup bundler bundler: webpack 📦 Issue is related to webpack bundler needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@maciejmyslinski
Copy link

Environment

  • Linaria version: 3.0.0-beta.0
  • Bundler (+ version): rollup 2.34.1
  • Node.js version: 15.1.0
  • OS: macos 10.15.7

Description

Linara babel transform fails when the class name contains 'css'. Error message:

[!] (plugin linaria) SyntaxError: /Users/user-name/theme/src/prismjs.ts_k6975d.css: Unexpected token (1:0)

> 1 | .pu7lc9 .css{color:red;}
    | ^

That's a super specific use case, can't you just use a different class name?
No. I'm creating a prismjs theme and I specifically need .language-css class name.

Reproducible Demo

css`
  .css {
    color: red;
  }
`;
@maciejmyslinski maciejmyslinski added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Dec 4, 2020
@github-actions github-actions bot added bundler: rollup 🗞️ Issue is related to rollup bundler bundler: webpack 📦 Issue is related to webpack bundler and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Dec 4, 2020
@Anber
Copy link
Collaborator

Anber commented Dec 6, 2020

Hi @maciejmyslinski!
It's the same problem #694
The fix for 3.0 will be released in the next beta on the following week. As a temporary solution, you can mark all css files as ignored.
Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: rollup 🗞️ Issue is related to rollup bundler bundler: webpack 📦 Issue is related to webpack bundler needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

No branches or pull requests

2 participants