Error: Module "css" does not provide a view engine.
通过串联gulp.src
参数。
没有错误:
const css = [
'src/scss/main.scss',
];
此错误:
const css = [
'src/assets/scss/reset.scss',
'src/assets/scss/styles.scss',
'src/scss/main.scss',
];
这是我的口水设置:
// Compile Sass with source maps
gulp.task('sass-dev', function() {
return gulp.src(css)
.pipe(sourcemaps.init())
.pipe(sass().on('error', logError))
.pipe(autoprefixer(CONFIG))
.pipe(rename('main.min.css'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./public/assets/css'));
});
gulp.task('sass', function() {
return gulp.src(css)
.pipe(sass({outputStyle: 'compressed'}).on('error', logError))
.pipe(autoprefixer(CONFIG))
.pipe(rename('main.min.css'))
.pipe(gulp.dest('./public/assets/css'));
});