swc
swc copied to clipboard
[CSS] Deduplication of minifier is not smart enough
Describe the feature
For input
body {
color: red;
}
body {
color: red;
}
cssnano will discard duplicated rules.
https://cssnano.co/playground/
Babel plugin or link to the feature description
No response
Additional context
Not an urgent request. Just want to bring it up.
It's already supported by the swc_css_minifier
@kdy1 I tested locally.
A complicated case like this isn't discarded.
body {
color: red;
}
h1 {
color: red;
}
body {
color: red;
}
CSSnano outout