Styles are being duplicated with >= 2.0.0
stefangrund opened this issue · 8 comments
We just updated our build process (runs on Node 5) to use grunt-contrib-cssmin 2.2.0 and now we're experiencing that all the styles in our css file are being duplicated in the *.min.css, which is generated with grunt-contrib-cssmin >= 2.0.0.
After we downgraded back to 1.0.2 everything works fine.
Here's our configuration, but I guess that's not the problem. Maybe it's an issue with clean-css?
Any ideas?
Any news on this?
We faced the exact same issue causing errors in IE which is used by our clients.
Thanks for raising the issue here. We downgraded as well and it works fine again.
I need the smallest test case I can reproduce the issue or make sure it's not an issue with clean-css.
The same issue with 2.2.1.
@XhmikosR Ehm... Do you need any settings/examples?
Here is the sode:
concat: {
dist: {},
critic: {
files: [{
nonull: true,
src: ['public_html/test/www-critical/critical1.css'...,'public_html/test/www-critical/critical17.css',],
dest: 'public_html/test/css/critical.css'
}]
},
},
critical: {
test1: {
options: {
base: 'public_html',
css: [
'public_html/assets/templates/thesite/css/concat.min.css'
],
width: 1024,
height: 768
},
src: 'public_html/test/www-processed/index.html',
dest: 'public_html/test/www-critical/critical1.css'
},
...
test17: {},
cssmin: {
target: {},
critic: {
files: [{
expand: true,
cwd: 'public_html/test/css/',
src: ['critical.css'],
dest: 'public_html/assets/templates/thesite/css/',
ext: '.min.css'
}]
}
},
...
'clean',
'uncss',
'concat:dist',
'cssmin:target',
'fetchpages',
'processhtml',
'critical',
'concat:critic',
'cssmin:critic',
Here is the result:
https://drive.google.com/file/d/0B0hmakB01_IcV1RjY1R6OGJwWE0/view?usp=sharing
I just don't see how cssmin can cause this. Something in your plugins chain is causing it. Try removing critical.
I can launch it with just grunt cssmin:critic
and result will be the same.
I've just downgraded to 1.0.2. It's okay now:
https://drive.google.com/file/d/0B0hmakB01_IcTDc0Z1NNOWVWZlU/view?usp=sharing
Old version used to REMOVE duplicates (there are really there in my source file critical.css).
Need my SSH? Let me know then.
I honestly don't see anything that could have caused this from our side.
It's either an upstream issue (or configuration) or something in your workflow.