sindresorhus / gulp-autoprefixer

Prefix CSS
MIT License
694 stars 50 forks source link

Not prefixing #105

Open alexandar87 opened 6 years ago

alexandar87 commented 6 years ago

This is my gulpfile.js:

var uglify = require('gulp-uglify');
var jshint = require('gulp-jshint');
var sass = require('gulp-sass');
var prefix = require('gulp-autoprefixer');
var cssmin = require('gulp-cssmin');
var concat = require('gulp-concat');
var imagemin = require('gulp-imagemin');
var rename = require('gulp-rename');
var pngcrush = require('imagemin-pngcrush');
var svgstore = require('gulp-svgstore');
var svgmin = require('gulp-svgmin');

// Compilation: SCSS into CSS
gulp.task('scss', function () {
  return gulp.src('./scss/style.scss')
    .pipe(prefix())
    .pipe(sass())
    .pipe(gulp.dest('./dist/css/'))
    .pipe(cssmin())
    .pipe(rename({suffix: '.min'}))
    .pipe(gulp.dest('./dist/css/'));
});
dmitrycy commented 5 years ago

I had the same problem, resolved it by adding a settings object into the autoprefixer, like so:

.pipe(prefix({
  browsers: ['last 2 versions'],
  cascade: false
}));

Give it a shot.