0

I am using postcss-cssnext and in my webpack.config I removed autoprefixer

postcss: [autoprefixer({ browsers: ['last 2 versions'] }) ],

and included cssnext. I understand that cssnext already includes autoprefixer so we don't need both included. I am just wondering how I pass in the browserslist to cssnext? This is what I currently have:

postcss: [cssnext()],
svnm
  • 22,878
  • 21
  • 90
  • 105

3 Answers3

2

I ran into this same question with gulp. Here is what I used.

postcss: [cssnext({ browsers: ['last 2 versions'] })]
0

It looks like the options work the same for cssnext: cssnext usage

This is the exact same option that you might know from Autoprefixer. Since cssnext includes Autoprefixer, the option is propagated.

svnm
  • 22,878
  • 21
  • 90
  • 105
0

I am using Gulp.js and here is my code thar run everytime i use postcss-cssnext to auto put vendor prefixes in my CSS styles.

var plugins = [ cssnext({browsers: ['last 2 versions']})];