-
Notifications
You must be signed in to change notification settings - Fork 36
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
minCSS Option Throws Error in 2.17.2 and Up #50
Comments
Thanks for writing up an issue. I think the best way to fix this is to allow passing of plugin options to gulp-minify-css, as well as to all other plugins, e.g.: module.exports = {
bundle: {
main: {
styles: [
'stylesheet/src/main.less'
],
options: {
useMin: false, // pre-minified files
minCSS: true,
rev: true,
transforms: {
styles: styleTransforms
},
pluginOptions: {
'gulp-minify-css': {processImport: false},
'gulp-uglify': {mangle: false}
}
}
}
}
}; Thoughts? Do you have a better idea on how to structure this? |
No, I like this approach. Having control over the process being preformed would be ideal. It would be nice as well to add additional process into the flow, but I know that's out of scope of this issue. I'm looking into how to incorporate gulp-remember into the current bundle flow. |
@smschrader if you have specific things you want to add to the flow that are not possible today, please create a new issue for that so I can track the work. Thanks! |
add pluginOptions config option. Fixes #50
@smschrader we updated |
Sorry for the delay, just got a chance to update and test, everything is working as expected. |
So I actually got to spend time today investigating this issue. It appears your code is OK, and it's actually another bug within the clean-css plugin. There is an issue with how it "interprets" short hand css properties and converts their values. Issue in Clean CSS For example in my case the shorthand font: 11px/normal sans-serif; got converted to font: 11px/400 sans-serif; when minify css was set to true which made it appear like the same issue. |
Thanks for looking into this. Do you know off the top of your head: will this problem be helped by upgrading to the latest |
Let me go force the version and check. |
No, I updated to the most recent version of clean-css in your package and get the same error. I left a comment on their font thread as well. Based on this fixed that was put in, it's still going to be an issue as it's only looking for "normal" and not checking boundaries before of after the string. I'm sure it's almost a non issue and the value "normal" for line-height is rarely used. I inherited the code that was causing the issue and had to double check to see if it was even a legal value for line-height. |
ok thanks for investigating. I'm closing this issue for now. |
Error -
is thrown when option is enabled for Less files. Issues goes away with earlier releases.
Seems to be an issue with the clean-css module.
Might be related to Issue https://github.com/jonathanepollack/gulp-minify-css/issues/61
Sample Config:
Sample Gulp Task:
The text was updated successfully, but these errors were encountered: