gulp-resolve-url不适用于gulp-clean-css

时间:2018-10-21 19:58:35

标签: css gulp resolveurl gulp-clean-css

我正在构建一个Gulp启动器,我想将gulp-resolve-urlgulp-clean-css的相对路径匹配,后者似乎是缩小CSS的最佳gulp插件。

这是我的SCSS任务:

gulp.task('scss', () => {
    return gulp.src('src/scss/master.scss')
    .pipe(plumber())
    .pipe(sourcemaps.init())
    .pipe(sass().on('error', sass.logError))
    .pipe(gulpResolveUrl())
    .pipe(cleancss({ compatibility: 'ie8' }))
    .pipe(rename('master.min.css'))
    .pipe(gulp.dest('public/css'))
    .pipe(browserSync.stream());
});


我遇到这个错误:

SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.


(适用于gulp-cssmin

0 个答案:

没有答案