Cssnano: Can't pass parameters to Autoprefixer.

Created on 1 Oct 2015  路  5Comments  路  Source: cssnano/cssnano

Hi!, I'm adding cssnano to our official office workflow, but I can't make autoprefixer to run with the options we need 1 ( browsers: ['last 2 versions'] and map: true ) for some reason, I've tried to config this in multiple ways but I can't seem to make it work. Also, cssnano doubles the compiling time of our project, I don't know if this is to be expected. ( it's not much though, like 1.2s more ).

question

All 5 comments

@EduardoRT Pass also add: true. In cssnano by default it only removes prefixes.

@EduardoRT cssnano is not very fast for now. But we work on it much

Thanks! that fixed it :+1: You should add that to the docs I think, and It's not really THAT slow for all the stuff it does. :)

Thanks!

@TrySound add: true was the trick for me too after a morning trying to work out why Autoprefixer wasn't prefixing. In hindsight it makes sense, but it really wasn't obvious why, or how to fix it.

@jaydenseric If you use autoprefixer before cssnano, autoprefixer in cssnano won't be used. cssnano's autoprefixer should only remove extra prefixes for minification purpose.

Was this page helpful?
0 / 5 - 0 ratings