jleeson / rollup-plugin-import-css

A Rollup plugin to import CSS into JavaScript
MIT License
47 stars 6 forks source link

Minification is still broken #31

Closed greentore closed 1 hour ago

greentore commented 3 hours ago
:is(.a-very-long-class-name, .b-very-long-class-name, .c-very-long-class-name)
  textarea {
  margin: 0;
}
import "./style.css";

Result

const style = ":is(.a-very-long-class-name,.b-very-long-class-name,.c-very-long-class-name)textarea{margin:0;}";

The issue

Space between :is() and textarea is missing. v3.5.1 works correctly.

jleeson commented 3 hours ago

@greentore, it looks like this is a result of the textarea being on a different line, the newline character is affecting the parsing. I will have a fix for this shortly.

jleeson commented 3 hours ago

@greentore, update your project to v3.5.6 and this should fix the minification problem you are running into. Let me know if there are any more problems.

greentore commented 1 hour ago

It worked. Thanks for quick fix.